18.01.2015, 03:09
Hello,
Basically I am trying to increase Pvar "TimesShot" when ever someone is shot.
Here is my code
When they spawn I have their pvar set to 0
So it should read
GetPVarInt(damagedid "TimesShot") This Var = 0
So after my if statement.... It should ADD +1 to the pvar, So example
If Pvar = 0 - After the if statement it = 1
And just keeps going until it reaches 10.
Any help would be nice.
Basically I am trying to increase Pvar "TimesShot" when ever someone is shot.
Here is my code
Код:
doWepDamage(damagedid, Float:amount, wepid) { new Float:health; new Float:armour; GetPlayerHealth(damagedid, health); GetPlayerArmour(damagedid, armour); if(armour > 1 && armour <= MAX_ARMOUR) { SetPlayerArmourEx(damagedid, armour-amount); } else { SetPlayerArmourEx(damagedid, 0); SetPlayerHealthEx(damagedid, health-amount); } tryToApplyHurt(damagedid, health); dropPlayerFromBike(damagedid, wepid); new beenshot = 1; new shotamount = GetPVarInt(damagedid, "TimesShot"); new gotshot = SetPVarInt(damagedid, "TimesShot", ++beenshot); if(shotamount < 10) { gotshot++; SendClientMessage(damagedid, X11_TOMATO_2, "You have been shot!"); } else { } wobbleScreenForPlayer(damagedid, 500, 64000); //clientid, time in ms, drunkLevelamount return 1; }
So it should read
GetPVarInt(damagedid "TimesShot") This Var = 0
So after my if statement.... It should ADD +1 to the pvar, So example
If Pvar = 0 - After the if statement it = 1
And just keeps going until it reaches 10.
Any help would be nice.