player stats - 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)
+--- Thread: player stats (
/showthread.php?tid=415792)
player stats -
sscarface - 14.02.2013
i am trying to saving player all wanted star. how much they got it. but can u help me ?
PHP код:
PlayerInfo[playerid,GetPlayerWantedLevel(playerid)][pWantedlvl]++;
can u fix it?
error:
: error 029: invalid expression, assumed zero
Re: player stats -
DaRk_RaiN - 14.02.2013
pawn Код:
PlayerInfo[playerid][pWantedlvl] + GetPlayerWantedLevel(playerid);
Re: player stats -
sscarface - 14.02.2013
warning 215: expression has no effect
Re: player stats -
gtakillerIV - 14.02.2013
What are you trying to do?
Re: player stats -
sscarface - 14.02.2013
Quote:
Originally Posted by gtakillerIV
What are you trying to do?
|
i am trying to save player wanted stars how much they got all the times ingame.
example: if u rob a bank and get 6 stars. and rob again and get 6 stars again
so here is my point.
i want they save on PlayerInfo[playerid][pWantedlvl]
when player check stats so they show to players
wanted lvl: 12
but the problem is they saving not stars
Re: player stats -
gtakillerIV - 14.02.2013
So, you want the player's wanted level to get saved in your variable? If so then do it like this:
pawn Код:
PlayerInfo[playerid][pWantedlvl] = GetPlayerWantedLevel(playerid);
Re: player stats -
sscarface - 14.02.2013
Quote:
Originally Posted by gtakillerIV
So, you want the player's wanted level to get saved in your variable? If so then do it like this:
pawn Код:
PlayerInfo[playerid][pWantedlvl] = GetPlayerWantedLevel(playerid);
|
work but not saving old wanted lvl
Re: player stats -
sscarface - 14.02.2013
thanx to all for replying.
now fixed:
PHP код:
PlayerInfo[playerid][pWantedlvl] += GetPlayerWantedLevel(playerid);