13.12.2012, 11:42
Well you are using
PlayerInfo[pLSPD][toplayerid] = rank;
So if you use /finvitelspd 1 3
the rank will be 3 not 7, because it overwrites the old data.
If you want players to not be able to use /finvitelspd 1 6 or higher, you should put a
line above
PlayerInfo[pLSPD][toplayerid] = rank;
if you want it to increase the rank you should use
instead
And add a line above it like,
PlayerInfo[pLSPD][toplayerid] = rank;
So if you use /finvitelspd 1 3
the rank will be 3 not 7, because it overwrites the old data.
If you want players to not be able to use /finvitelspd 1 6 or higher, you should put a
pawn Код:
if(rank > 5) return SendPlayerMessage(playerid,-1,"Invalid rank amount.");
PlayerInfo[pLSPD][toplayerid] = rank;
if you want it to increase the rank you should use
pawn Код:
PlayerInfo[pLSPD][toplayerid] += rank;
pawn Код:
PlayerInfo[pLSPD][toplayerid] = rank;
pawn Код:
if(PlayerInfo[pLSPD][toplayerid]+rank > 5) return SendPlayerMessage(playerid,-1,"Invalid rank amount.");