01.06.2010, 23:32
pawn Код:
if(strcmp(cmdtext, "/robbank", true) == 0) // If they type /robbank
{
if(IsPlayerInCheckpoint(playerid, 2312.6365, -6.3147, 26.7422)) // Check if they are in a checkpoint
{
new string[128];
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
new cash = random(60000); // random number between 1 & 60000 is the money they will get
GivePlayerMoney(playerid, cash); // Give the player the money!
format(string,sizeof(string),"%s has just stolen %s from the bank!",playername,cash);
SendClientMessageToAll(COLOR_WHITE,string);
}
return 1;
}