[Please Help]GetPlayerMoney
#1

hello, i wanted to ask, how do i check player money: if player teleports to /drift, the checker turns on and it writes player's money to somewhere but after he reaches the checkpoint the checker turns off, and if player's money doesnt rise when he drifts (i have drift counter) in e.g. 5000 he dont get his money?? bad English, sorry, if you dont understand ask, please?
Reply
#2

pawn Код:
if(GetPlayerMoney(playerid) < 1000)
return SendClientMessage(playerid,COLOR_RED,"You don't have enough money");
Change 1000 to what you want it to cost.
Reply
#3

no, no, you dont understand me, i want to check how much players' money raised after teleporting...
Reply
#4

Oh, save their score before they teleport, and check the different afterwards.

pawn Код:
OldCash[playerid] = GetPlayerCash(playerid)
Put that where they teleport

NewCash[playerid] = GetPlayerCash(playerid)
Put that after they've done it all
Then do whatever checks you want to do with NewCash & OldCash
Is that what you wanted?

EDIT:
pawn Код:
new OldCash[MAX_PLAYERS],NewCash[MAX_PLAYERS]
Put that at top of scriprt

EDIT2:
To activate it, when he teleports, run a timer, or something, and to disable it again, KillTimer();
Reply
#5

Thank you.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)