02.04.2013, 13:42
pawn Код:
CMD:robriver(playerid, params[])
{
if(GetTeam{playerid} != CLASS_CIV) return SendClientMessage(playerid, RED, "Only civilians can rob places.");
if(IsRobbingIsle{playerid} == true) return SendClientMessage(playerid, RED, "Your already robbing the joint.");
if(IsPlayerHoldingAGun(playerid) == 0 || HasBeenCuffed{playerid} == true) return SendClientMessage(playerid, RED, "You must be holding a gun to rob places.");
if((gettime() - 120) < TimerInfo[playerid][CMD_timer16]) return SendClientMessage(playerid, RED, "Please wait before using this command again.");
TimerInfo[playerid][CMD_timer16] = gettime();
new chance = random(3);
if(chance == 0)
{
format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s (%d) has attempted to rob Riverside Casino in Santa Maria Beach. ", GetName(playerid), playerid);
CopRadio(BLUE, fstr);
SendClientMessage(playerid, RED, "You have failed to rob Riverside Casino in Santa Maria Beach");
GameTextForPlayer(playerid, "~w~Robbery ~r~Failed", 5000, 5);
SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid) + 4);
}
else if(GetPlayerVirtualWorld(playerid) == 1 && IsPlayerInRangeOfPoint(playerid,1.0,1139.7198,-4.0644,1000.6719))
{
if((gettime() - 120) < islerobbed) return SendClientMessage(playerid, RED, "This place has been robbed recently, try again later.");
format(fstr, sizeof(fstr), "[DISPATCH]: Suspect %s (%d) is now robbing Riverside Casino in Santa Maria Beach.", GetName(playerid), playerid);
CopRadio(BLUE, fstr);
SendClientMessage(playerid, LIGHTGREEN, "Your robbing Riverside Casino, DON'T LEAVE THE CHECKPOINT!");
GameTextForPlayer(playerid, "~r~Holdup ~w~In ~g~Progress...~n~~r~Dont Leave ~w~The ~r~Checkpoint.", 25000, 5);
SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+6);
IsRobbingIsle{playerid} = true;
isletimer{playerid} = SetTimerEx("IsleRob", 25000, false, "d", playerid);
ApplyAnimation(playerid,"ped","ARRESTgun",4.1,0,1,1,1,1);
islerobbed = gettime();
}
else
{
SendClientMessage(playerid, RED, "Your not at the robbery checkpoint.");
}
new astring[100],pName[24];
GetPlayerName(playerid,(pName),sizeof(pName));
format(astring,sizeof(astring),"%s (%d) typed: /robriver",pName,playerid);
SendAdminMessage(ORANGE,astring);
return true;
}
Here is little script, how i can set it to - 25 seconds till robbery and, than 24 seconds, time back with 25 seconds...
25,24,23,22,21,20...