12.11.2013, 13:33
Код:
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); } public waittimer() { robpossible = 1; //With this we make the bank available for robbery again, and we display a friendly message to all players. SendClientMessageToAll(COLOR_WHITE, "[OOC]The bank is now available for robbery![OOC]"); }