28.07.2011, 10:20
(
Последний раз редактировалось phil_lendon; 28.07.2011 в 10:59.
)
Right okay, i was given a code the other day but unfortunetally it only lets me rob ONCE and never again until i restart :S so how can i make it so it waits 2 mins before u can rob again and say "You must wait 2 minutes!"
pawn Код:
if(!strcmp("/rob",cmdtext))
{
if(Robbed[playerid]) return SendClientMessage(playerid, 0xFF0000FF, "You already robbed once.");
if(IsPlayerInRangeOfPoint(playerid, 500, -23.50, -55.64, 1003.55))
{
if( GetPlayerTeam( playerid ) == 2 ) return SendClientMessage( playerid, 0xFF0000FF, "You're a cop, you can't rob." );
new string[120], playerName[MAX_PLAYER_NAME];
GetPlayerName(playerid, playerName, MAX_PLAYER_NAME);
format(string, sizeof(string), "%s Is Robbing, And is now wanted!", playerName);
SendClientMessageToAll(0xFFFFFFFF, string);
SetPlayerWantedLevel(playerid, 6);
new money = 500 + random(50000);
GivePlayerMoney(playerid, money);
Robbed[playerid] = true;
}
return 1;