player stats
#1

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
Reply
#2

pawn Код:
PlayerInfo[playerid][pWantedlvl] + GetPlayerWantedLevel(playerid);
Reply
#3

warning 215: expression has no effect
Reply
#4

What are you trying to do?
Reply
#5

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
Reply
#6

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);
Reply
#7

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
Reply
#8

thanx to all for replying.


now fixed:

PHP код:
PlayerInfo[playerid][pWantedlvl] += GetPlayerWantedLevel(playerid); 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)