(Pomoc) Weapon demage editor

Započeo Bobo, Jul 31, 2012, 19:23:14 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:Moj Mod
Detaljan opis problema:Napravio sam demage za oruzja i problem je sledeci.Weapon demage radi npr za deagle sam stavio 50 posto energije da skine i sada ja opalim 2 metka igraca ubije sto je ok..Ali ako mi igrac ima armour ja opalim metak iz deaglea svejedno mu skine 50 posto energije i 20 posto armoura i opet mi 2 metka ubiju covijeka...Ja zelim kada ima armour da onda treba vise metaka a ne da mi skida 50 posto imao armour ili nemao armour...
Dio skripte:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    if(weaponid == 24) SetPlayerHealth(playerid, HP-50);//DesertEagle
    if(weaponid == 22) SetPlayerHealth(playerid, HP-50);//Colt45
    if(weaponid == 32) SetPlayerHealth(playerid, HP-10);//Tec9
    if(weaponid == 28) SetPlayerHealth(playerid, HP-10);//Uzi
    if(weaponid == 23) SetPlayerHealth(playerid, HP-50);//SilencedColt
    if(weaponid == 31) SetPlayerHealth(playerid, HP-35);//M4
    if(weaponid == 30) SetPlayerHealth(playerid, HP-40);//AK
    if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
    if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
    if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
    if(weaponid == 25) SetPlayerHealth(playerid, HP-100);//PumpShotgun
    if(weaponid == 27) SetPlayerHealth(playerid, HP-70);//Spaz12
    return 1;
}

Neke slike/video za lakse dobivanje pomoci(neobavezno):

Ova skripta ce ti radit da ako ima armour skida armour normalno ali i HP:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    new Float:ARM;
    new a = GetPlayerArmour(playerid, ARM);
    if(!a >= 1)
    {
    if(weaponid == 24) SetPlayerHealth(playerid, HP-50);//DesertEagle
    if(weaponid == 22) SetPlayerHealth(playerid, HP-50);//Colt45
    if(weaponid == 32) SetPlayerHealth(playerid, HP-10);//Tec9
    if(weaponid == 28) SetPlayerHealth(playerid, HP-10);//Uzi
    if(weaponid == 23) SetPlayerHealth(playerid, HP-50);//SilencedColt
    if(weaponid == 31) SetPlayerHealth(playerid, HP-35);//M4
    if(weaponid == 30) SetPlayerHealth(playerid, HP-40);//AK
    if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
    if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
    if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
    if(weaponid == 25) SetPlayerHealth(playerid, HP-100);//PumpShotgun
    if(weaponid == 27) SetPlayerHealth(playerid, HP-70);//Spaz12
    }
    return 1;
}


Jesi to htio?
Izrada web aplikacija/desktop aplikacija, kontakt PM.
VPS/Dedi managment 'n' hosting @pm also.

Citat: !вÏ...!Ñ•Ñ"уzιι¢нâ,,¢.amx poslato Jul 31, 2012, 19:26:39 POSLE PODNE
Ova skripta ce ti radit da ako ima armour skida armour normalno ali i HP:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP;
    GetPlayerHealth(playerid, HP);
    new Float:ARM;
    new a = GetPlayerArmour(playerid, ARM);
    if(!a >= 1)
    {
    if(weaponid == 24) SetPlayerHealth(playerid, HP-50);//DesertEagle
    if(weaponid == 22) SetPlayerHealth(playerid, HP-50);//Colt45
    if(weaponid == 32) SetPlayerHealth(playerid, HP-10);//Tec9
    if(weaponid == 28) SetPlayerHealth(playerid, HP-10);//Uzi
    if(weaponid == 23) SetPlayerHealth(playerid, HP-50);//SilencedColt
    if(weaponid == 31) SetPlayerHealth(playerid, HP-35);//M4
    if(weaponid == 30) SetPlayerHealth(playerid, HP-40);//AK
    if(weaponid == 29) SetPlayerHealth(playerid, HP-18);//MP5
    if(weaponid == 34) SetPlayerHealth(playerid, HP-300);//SniperRifle
    if(weaponid == 33) SetPlayerHealth(playerid, HP-35);//CuntGun
    if(weaponid == 25) SetPlayerHealth(playerid, HP-100);//PumpShotgun
    if(weaponid == 27) SetPlayerHealth(playerid, HP-70);//Spaz12
    }
    return 1;
}


Jesi to htio?

Hocu da kada nema armoura da deagle skida 50 posto energije (to je za primjer rekao koliko da skida) ,a kada ima armour da skida vise armoura a manje energije.. Pokusao sam i s ovime:

public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
{
    new Float:HP,Float:A;
    GetPlayerHealth(playerid, HP);
    GetPlayerArmour(playerid,A);
    if(A > 0.0)
    {
        if(weaponid == 31) SetPlayerArmour(playerid, A+amount-50);
        if(weaponid == 30) SetPlayerArmour(playerid, A+amount-26);
        if(weaponid == 34) SetPlayerArmour(playerid, A+amount-90);
        if(weaponid == 29) SetPlayerArmour(playerid, A+amount-20);
        if(weaponid == 24) SetPlayerArmour(playerid, A+amount-80);
        if(weaponid == 4) SetPlayerArmour(playerid, A+amount-60);
        if(weaponid == 26) SetPlayerArmour(playerid, A+amount-30);
        if(weaponid == 32) SetPlayerArmour(playerid, A+amount-20);
    }
    else
    {
        if(weaponid == 31) SetPlayerHealth(playerid, HP+amount-80);
        if(weaponid == 30) SetPlayerHealth(playerid, HP+amount-26);
        if(weaponid == 34) SetPlayerHealth(playerid, HP+amount-90);
        if(weaponid == 29) SetPlayerHealth(playerid, HP+amount-20);
        if(weaponid == 24) SetPlayerHealth(playerid, HP+amount-25);
        if(weaponid == 4) SetPlayerHealth(playerid, HP+amount-60);
        if(weaponid == 26) SetPlayerHealth(playerid, HP+amount-30);
        if(weaponid == 32) SetPlayerHealth(playerid, HP+amount-20);
    }
    return 1;
}
Poslednja Izmena: Jul 31, 2012, 19:48:34 POSLE PODNE od Brico