pvar - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: pvar (
/showthread.php?tid=190742)
pvar -
sansko - 16.11.2010
i dont get wat is wrong here
pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid == INVALID_PLAYER_ID)
{
SetPVarFloat(playerid, "var", 0);
}
else
{
SetPVarFloat(killerid, "var", += 1);
}
return 1;
}
Re: pvar -
[H]265 - 16.11.2010
pawn Код:
SetPVarInt(killerid ,"var", GetPVarInt(killerid, "var") + 1);
Re: pvar -
sansko - 16.11.2010
thanks i gonna try it right now
Re: pvar -
[H]265 - 16.11.2010
I make macro fnc for you...
pawn Код:
#define SetPVarIntEx(%0,%1,%2,%3) SetPVarInt(%0,%1, GetPVarInt(%0,%1) %2 %3)
Now you just need to make this
pawn Код:
SetPVarIntEx(killerid,"var",+,1); // +
SetPVarIntEx(killerid,"var",-,1); // -
Enjoy