Question [+REP]
#9

Quote:
Originally Posted by karemmahmed22
Посмотреть сообщение
Ok, Now Put the array (variable) on top of your script under your defines / variables,
And OnPlayerUpdate:-
PHP код:
if(GetPlayerMoney(playerid) > Money[playerid])
{
      new 
IncreasedAmount GetPlayerMoney(playerid) - Money[playerid];
      
// your code.
      
Money[playerid] = GetPlayerMoney(playerid// this to update the variable with the current cash so, it does the same again after cash gets increased again..

Edit: OnPlayerConnect
PHP код:
Money[playerid] = 0
To reset the array
Yea but this can't detect if the player has gain or lost money for example if the player got money I will put + increasedamount$ or if lost -increasedamount$
Код:
Money[playerid] += 50000
This will mean that will send the message if the player has 50k+, so can I only put new Money[playerid]?

- EDIT -
I didn't see the edit, sorry gotta test it
Reply


Messages In This Thread
Question [+REP] - by SecretBoss - 24.09.2015, 13:47
Re: Question [+REP] - by karemmahmed22 - 24.09.2015, 13:52
Re: Question [+REP] - by SecretBoss - 24.09.2015, 13:53
Re: Question [+REP] - by TheSnaKe - 24.09.2015, 13:54
Re: Question [+REP] - by SecretBoss - 24.09.2015, 13:56
Re: Question [+REP] - by karemmahmed22 - 24.09.2015, 13:57
Re: Question [+REP] - by SecretBoss - 24.09.2015, 13:58
Re: Question [+REP] - by karemmahmed22 - 24.09.2015, 14:02
Re: Question [+REP] - by SecretBoss - 24.09.2015, 14:05
Re: Question [+REP] - by karemmahmed22 - 24.09.2015, 14:13

Forum Jump:


Users browsing this thread: 1 Guest(s)