12.11.2013, 14:09
Код:
stock GivePlayerCash(playerid, money) { SetPVarInt(playerid, "Cash", GetPVarInt(playerid, "Cash")+money); GivePlayerMoney(playerid, money); return 1; }
Should I put it in the filescript or something? I have to change the..?
Код:
public robtimer(playerid) { new string[128];//We are defining a new string for the formatted message that we are displaying later on. new cash = random(200000); GivePlayerMoney(playerid, cash); /* With the fuction above 'new cash = random(200000); GivePlayerMoney(playerid, cash);' we give the player a random amount of money from $0 - $200,000 */ //Here below we use the string we defined above to format the message itself and display it to the player. format(string, sizeof(string), "You have successfully robbed $%d from the bank!", cash); SendClientMessage(playerid, COLOR_WHITE, string); }