PlayerInfo[playerid][level] - 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: PlayerInfo[playerid][level] (
/showthread.php?tid=256825)
PlayerInfo[playerid][level] -
omer5198 - 22.05.2011
if i do that when a player kill someone this will happen:
Code:
PlayerInfo[killerid][level] += 1;
and then... i want to check if the player level is 10... so i do:
Code:
if(PlayerInfo[killerid][level] == 10)
{
...
...
...
}
so my question is... will it check the killerid level after he killed someone (when he got +1) or before?
Re: PlayerInfo[playerid][level] -
ScottCFR - 22.05.2011
Depends on placing of the code. Add the check before you +1 the level.
Code:
if(PlayerInfo[killerid][level] == 10)
{
...
...
...
}
PlayerInfo[killerid][level] += 1;