23.04.2014, 11:53
So I'm trying to do like this . Get players cash and multiply it by 10%
Example: If Player1 has $1000 , the payday system will get the $1000 and multiply it by 10% and gives the cash.
Here is my script atm. It's giving like max cash
Example: If Player1 has $1000 , the payday system will get the $1000 and multiply it by 10% and gives the cash.
Here is my script atm. It's giving like max cash
pawn Код:
forward payday(playerid);
public payday(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++) if(IsPlayerConnected(i))
{
new money, perc;
money = GetPlayerMoney(playerid);
perc = money*2;
GivePlayerMoney( playerid, perc );
SendClientMessage(playerid, COLOR_WHITE,"Testing payday!");
SendClientMessage(playerid, COLOR_WHITE,"You have recieve a check of $%i", perc);
}
return 1;
}