12.10.2012, 17:25
my money bar is not getting updated, yet the players statistics are... please help.
Код:
Player[playerid][Money] += 1000;
Player[playerid][Money] += 1000;
Sorry, but isnt there a way ( i forget how ) to tell it to add the player money (giveplayermoney) when that is used?
So like if I "Player[playerid][Money] -= 9;" It also does "GivePlayerMoney(playerid, -9)" ? Thank you in advanced, |
stock GivePlayerCash(playerid, amoney) { PlayerInfo[playerid][Money] = amoney; }
Is there a Connector between them?
if no, then Код:
stock GivePlayerCash(playerid, amoney) { PlayerInfo[playerid][Money] = amoney; } |
CMD:money(playerid, params[])
{
PlayerInfo[playerid][Money] += 100;
}
CMD:money(playerid, params[])
{
GivePlayerCash(playerid, 100); //same as GivePlayerMoney but the differ is it connects the variable with it.
}
assume I know what you have done in the script, then replace the variable & the function that gives the player money.
example: PHP код:
PHP код:
|
Player[Player[playerid][BeingTicketed]][Money] += Player[Player[playerid][BeingTicketed]][TicketPrice];