29.11.2013, 18:48
Hello,
Well I have created this command but i want it like if someone presses "Y" the robbery shld be started
Well I have created this command but i want it like if someone presses "Y" the robbery shld be started
pawn Код:
dcmd_robplace(playerid,params[])
{
new string[128];
#pragma unused params
if(IsSpawned[playerid] != 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You must be alive and spawned in order to be able to use this command.");
return 1;
}
if(IsKidnapped[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You are kidnapped. You cannot use this command.");
return 1;
}
if(IsFrozen[playerid] == 1)
{
SendClientMessage(playerid,COLOR_ERROR,"You have been frozen by a Server Administrator. You cannot use this command.");
return 1;
}
if(!IsPlayerInCheckpoint(playerid))
{
SendClientMessage(playerid,COLOR_ERROR,"You are not in the checkpoint of anywhere you can rob.");
return 1;
}
if(gTeam[playerid] == TEAM_COP || gTeam[playerid] == TEAM_ARMY || gTeam[playerid] == TEAM_CIA || gTeam[playerid] == TEAM_MEDIC || gTeam[playerid] == TEAM_STUNTER)
{
SendClientMessage(playerid,COLOR_ERROR,"You cannot rob things with your class/skill.");
return 1;
}
if(getCheckpointType(playerid) != CP_BurgerShotMain && getCheckpointType(playerid) != CP_CluckinBellMain && getCheckpointType(playerid) != CP_Casino1 &&
getCheckpointType(playerid) != CP_Ammunation && getCheckpointType(playerid) != CP_GayDarMain &&
getCheckpointType(playerid) != CP_MarketstationMain && getCheckpointType(playerid) != CP_VegasBarMain &&
getCheckpointType(playerid) != CP_GYM && getCheckpointType(playerid) != CP_Boaters &&
getCheckpointType(playerid) != CP_HodyCars && getCheckpointType(playerid) != CP_Train &&
getCheckpointType(playerid) != CP_Barbers && getCheckpointType(playerid) != CP_PizzaMain &&
getCheckpointType(playerid) != CP_ZipMain && getCheckpointType(playerid) != CP_AirportMain &&
getCheckpointType(playerid) != CP_BincoMain && getCheckpointType(playerid) != CP_CityHallMain
&& getCheckpointType(playerid) != CP_Tattoo && getCheckpointType(playerid) != CP_FourDragon && getCheckpointType(playerid) != CP_TT && CP_RPL)
{
SendClientMessage(playerid,COLOR_ERROR,"You are not in the checkpoint of anywhere you can rob.");
return 1;
}
new current_zone = player_zone[playerid];
new rrand =random(100);
if(getCheckpointType(playerid) == CP_FourDragon)
{
if(FourDragonRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Four Dragons has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Four Dragons Casino robbery failed.");
FourDragonRobbedRecently =320;
return 1;
}
if(Robskill[playerid] <= 39)
{
SendClientMessage(playerid,COLOR_ERROR,"You need 40 robskill to rob Four Dragons casino.");
return 1;
}
FourDragonRobbedRecently =320;
RobbingFourDragon[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingFourDragon[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Four Dragon Casino.~n~~r~Finish Robbery in: %d seconds.",RobbingFourDragon[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Four Dragons Casino! Get To Four Dragons Casino and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Four Dragons Casino ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Four Dragon Casino ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_TT)
{
if(TTRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Turning Tricks has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Turning Tricks Shop robbery failed.");
TTRobbedRecently =320;
return 1;
}
if(Robskill[playerid] <= 9)
{
SendClientMessage(playerid,COLOR_ERROR,"You need 10 robskill to rob Turning Tricks Shop.");
return 1;
}
TTRobbedRecently =320;
RobbingTT[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingTT[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Four Dragon Shop.~n~~r~Finish Robbery in: %d seconds.",RobbingTT[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Turning Trickss Shop! Get To Turning Trickss Shop and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Turning Trickss Shop ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Turning Tricks Shop ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Casino1)
{
if(zones[current_zone][zone_name] == zones[245][zone_name])
{
if(Casino2RobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Casino has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Casino robbery failed.");
Casino2RobbedRecently =320;
return 1;
}
if(Robskill[playerid] <= 29)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 30 robskill to rob casinos.");
return 1;
}
Casino2RobbedRecently =320;
RobbingCasino2[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingCasino2[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Casino.~n~~r~Finish Robbery in: %d seconds.",RobbingCasino2[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Casino! Get To Casino and arrest the suspect. Location :Old Venturas Strip",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Casino ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Casino ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
else {
if(Casino1RobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Casino has been robbed recently.");
return 1;
}
if(Robskill[playerid] <= 29)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 30 robskill to rob casino.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Casino robbery failed.");
Casino1RobbedRecently =320;
return 1;
}
Casino1RobbedRecently =320;
RobbingCasino1[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingCasino1[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Casino.~n~~r~Finish Robbery in: %d seconds.",RobbingCasino1[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Casino! Get To Casino and arrest the suspect. Location : Commerce",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Casino ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Casino ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
}
return 1;
}
if(getCheckpointType(playerid) == CP_BurgerShotMain)
{
if(BURGER[playerid] == 1)
{
if(Robskill[playerid] <= 9)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 10 robskill to rob the Burger shot.");
return 1;
}
if(GarciaBurgerShotRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Burger Shot has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Burger Shot robbery failed.");
GarciaBurgerShotRobbedRecently =320;
return 1;
}
GarciaBurgerShotRobbedRecently =320;
RobbingGarciaBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingGarciaBurgerShot[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Burger Shot.~n~~r~Finish Robbery in: %d seconds.",RobbingGarciaBurgerShot[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(BURGER[playerid] == 2)
{
if(JHBurgerShotRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Burger Shot has been robbed recently.");
return 1;
}
if(Robskill[playerid] <= 9)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 10 robskill to rob the Burger shot.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Burger Shot robbery failed.");
JHBurgerShotRobbedRecently =320;
return 1;
}
JHBurgerShotRobbedRecently =320;
RobbingJHBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing bURGER sHOT.~n~~r~Finish Robbery in: %d seconds.",RobbingJHBurgerShot[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(BURGER[playerid] == 3)
{
if(DownBurgerShotRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Burger Shot has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Burger Shot robbery failed.");
DownBurgerShotRobbedRecently =320;
return 1;
}
if(Robskill[playerid] <= 9)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 10 robskill to rob Burger Shot.");
return 1;
}
DownBurgerShotRobbedRecently =320;
RobbingDownBurgerShot[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingDownBurgerShot[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Burger Shot.~n~~r~Finish Robbery in: %d seconds.",RobbingDownBurgerShot[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Burger Shot! Get To Burger Shot and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Burger Shot ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
}
if(getCheckpointType(playerid) == CP_ZipMain)
{
if(Robskill[playerid] <= 19)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 20 robskill to rob zip.Type /robskill to now your robskill");
return 1;
}
if(ZipRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Zip has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR," Zip robbery failed.");
ZipRobbedRecently =320;
return 1;
}
ZipRobbedRecently =320;
RobbingZip[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingZip[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing ZIP.~n~~r~Finish Robbery in: %d seconds.",RobbingZip[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Zip! Get To Zip and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Zip ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Zip ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_BincoMain)
{
if(BINCO[playerid] == 1)
{
if(JHBincoRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Binco has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR," Binco robbery failed.");
JHBincoRobbedRecently =320;
return 1;
}
JHBincoRobbedRecently =320;
RobbingJHBinco[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingJHBinco[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Binco.~n~~r~Finish Robbery in: %d seconds.",RobbingJHBinco[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Binco! Get To Binco and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
else if(BINCO[playerid] == 2)
{
if(Binco2RobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Binco has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR," Binco robbery failed.");
Binco2RobbedRecently =320;
return 1;
}
Binco2RobbedRecently =320;
RobbingBinco2[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingBinco2[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Binco.~n~~r~Finish Robbery in: %d seconds.",RobbingBinco2[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Binco! Get To Binco and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Binco ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
}
if(getCheckpointType(playerid) == CP_AirportMain)
{
if(DownAirportRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Airport has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 30)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 30 to rob Airport. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Airport robbery failed.");
DownAirportRobbedRecently =320;
return 1;
}
DownAirportRobbedRecently =320;
RobbingDownAirport[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingDownAirport[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Airport.~n~~r~Finish Robbery in: %d seconds.",RobbingDownAirport[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Airport! Get To Airport and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Airport ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Airport ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_PizzaMain)
{
if(EsplanadePizzaRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Well Stacked Pizza has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR," Well Stacked Pizza robbery failed.");
EsplanadePizzaRobbedRecently =320;
return 1;
}
EsplanadePizzaRobbedRecently =320;
RobbingEsplanadePizza[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingEsplanadePizza[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Well Stacked Pizza.~n~~r~Finish Robbery in: %d seconds.",RobbingEsplanadePizza[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Well Stacked Pizza! Go and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Well Stacked Pizza ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Well Stacked Pizza ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Ammunation)
{
if(zones[current_zone][zone_name] == zones[250][zone_name] || zones[current_zone][zone_name] == zones[249][zone_name])
{
if(AmmunationRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Ammunation has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 30)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 30 to rob Ammunation. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Ammunation robbery failed.");
AmmunationRobbedRecently =320;
return 1;
}
AmmunationRobbedRecently =320;
RobbingAmmunation[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingAmmunation[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Ammunation.~n~~r~Finish Robbery in: %d seconds.",RobbingAmmunation[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Ammunation! Get To Ammunation and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Ammunation ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Ammunation ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
}
if(getCheckpointType(playerid) == CP_RPL)
{
if(RPLRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"RPL has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 40)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 40 to rob RPL. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"RPL robbery failed.");
RPLRobbedRecently =320;
return 1;
}
RPLRobbedRecently =320;
RobbingRPL[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingRPL[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing RPL~n~~r~Finish Robbery in: %d seconds.",RobbingRPL[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob RPL! Get To RPL and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at RPL..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at RPL..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_CityHallMain)
{
if(CityHallRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The City Hall has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 40)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 40 to rob the City Hall. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"City Hall robbery failed.");
CityHallRobbedRecently =320;
return 1;
}
CityHallRobbedRecently =320;
RobbingCityHall[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingCityHall[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing City Hall.~n~~r~Finish Robbery in: %d seconds.",RobbingCityHall[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the City Hall! Get To the City Hall and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the City Hall ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the City Hall ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Barbers)
{
if(BarbersRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Barbers has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Barbers robbery failed.");
BarbersRobbedRecently =320;
return 1;
}
BarbersRobbedRecently =320;
RobbingBarbers[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingBarbers[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Barbers.~n~~r~Finish Robbery in: %d seconds.",RobbingBarbers[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Barbers! Get To the Barbers and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the Barbers ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the Barbers ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Tattoo)
{
if(TattooRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Tattoos has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Tattoo robbery failed.");
TattooRobbedRecently =320;
return 1;
}
TattooRobbedRecently =320;
RobbingTattoo[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingTattoo[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Tattoos.~n~~r~Finish Robbery in: %d seconds.",RobbingTattoo[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Tattoos! Get To the Tattoos and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the Tattoos ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the Tattoos ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Train)
{
if(TrainRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Train Station has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 20)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 20 to rob the Train Station. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Train Station robbery failed.");
TrainRobbedRecently =320;
return 1;
}
TrainRobbedRecently =320;
RobbingTrain[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingTrain[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Train Station.~n~~r~Finish Robbery in: %d seconds.",RobbingTrain[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Train Station! Get To the Train Station and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the Train Station ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the Train Station ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_HodyCars)
{
if(HodyRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Hody Cars has been robbed recently.");
return 1;
}
if(Robskill[playerid] < 20)
{
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 20 to rob Hody Cars. Check /Robskill to see what you can rob.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Hody Cars robbery failed.");
HodyRobbedRecently =320;
return 1;
}
HodyRobbedRecently =320;
RobbingHody[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingHody[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Hody.~n~~r~Finish Robbery in: %d seconds.",RobbingHody[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Hody Cars! Get To Hody Cars and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Hody Cars ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Hody Cars ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_GYM)
{
if(Robskill[playerid] <= 29)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 30 robskill to rob Las Vegas GYM.");
return 1;
}
if(GYMRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The GYM has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"GYM robbery failed.");
GYMRobbedRecently =320;
return 1;
}
GYMRobbedRecently =320;
RobbingGYM[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingGYM[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Gym.~n~~r~Finish Robbery in: %d seconds.",RobbingGYM[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob LAs Vegas's GYM! Get to the GYM and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at GYM ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Las Vegas GYM ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_Boaters)
{
if(Robskill[playerid] <= 19)
{
SendClientMessage(playerid,COLOR_ERROR,"You need 20 robskill to rob the Boaters.");
return 1;
}
if(BoatersRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Boaters School has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Boaters School robbery failed.");
BoatersRobbedRecently =320;
return 1;
}
BoatersRobbedRecently =320;
RobbingBoaters[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingBoaters[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Boaters.~n~~r~Finish Robbery in: %d seconds.",RobbingBoaters[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Boaters School! Get to the Boaters School and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the Boaters School ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the Boaters School ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_GayDarMain)
{
if(zones[current_zone][zone_name] == zones[258][zone_name] || zones[current_zone][zone_name] == zones[259][zone_name] ||
zones[current_zone][zone_name] == zones[260][zone_name])
{
if(GayDarRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Gay Dar Station has been robbed recently.");
return 1;
}
if(Robskill[playerid] <= 29)
{
SendClientMessage(playerid,COLOR_ERROR,"You need 30 robskill to rob the Gay Dar station.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Gay Dar Station robbery failed.");
GayDarRobbedRecently =320;
return 1;
}
GayDarRobbedRecently =320;
RobbingGayDar[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingGayDar[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Gay Dar.~n~~r~Finish Robbery in: %d seconds.",RobbingGayDar[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Gay Dar Station! Get To Gay Dar Station and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Gay Dar Station ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Gay Dar Station ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
}
if(getCheckpointType(playerid) == CP_MarketstationMain)
{
if(Robskill[playerid] <= 19)
{
SendClientMessage(playerid,COLOR_ERROR,"You need 20 robskill to rob train station.");
return 1;
}
if(MarketstationRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Marketstation's has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Marketstation's robbery failed.");
MarketstationRobbedRecently =320;
return 1;
}
MarketstationRobbedRecently =320;
RobbingMarketstation[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingMarketstation[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Market's Station.~n~~r~Finish Robbery in: %d seconds.",RobbingMarketstation[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Marketstation's! Get To Marketstation's and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Marketstation's ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Marketstation's ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_VegasBarMain)
{
if(Robskill[playerid] <= 29)
{
SendClientMessage(playerid,COLOR_ERROR,"You need atleast 30 robskill to rob the Las Vegas Bar.");
return 1;
}
if(VegasBarRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"Las Vegas Bar has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Las Vegas Bar robbery failed.");
VegasBarRobbedRecently =320;
return 1;
}
VegasBarRobbedRecently =320;
RobbingVegasBar[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingVegasBar[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Las Vegas Bar.~n~~r~Finish Robbery in: %d seconds.",RobbingVegasBar[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Las Vegas Bar! Get To Grove's and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Las Vegas Bar ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Las Vegas Bar ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(getCheckpointType(playerid) == CP_CluckinBellMain)
{
if(zones[current_zone][zone_name] == zones[313][zone_name])
{
if(OceanCluckinBellRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Market's Cluckin Bell has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Market's Cluckin Bell robbery failed.");
OceanCluckinBellRobbedRecently =320;
return 1;
}
OceanCluckinBellRobbedRecently =320;
RobbingOceanCluckinBell[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingOceanCluckinBell[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Cluckin Bell.~n~~r~Finish Robbery in: %d seconds.",RobbingOceanCluckinBell[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Market's Cluckin Bell! Get To Cluckin Bell and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Cluckin Bell ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Cluckin Bell ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
if(zones[current_zone][zone_name] == zones[49][zone_name] || zones[current_zone][zone_name] == zones[50][zone_name] ||
zones[current_zone][zone_name] == zones[51][zone_name] || zones[current_zone][zone_name] == zones[52][zone_name] ||
zones[current_zone][zone_name] == zones[53][zone_name] || zones[current_zone][zone_name] == zones[54][zone_name])
{
if(DownCluckinBellRobbedRecently >= 1)
{
SendClientMessage(playerid,COLOR_ERROR,"The Downtown Cluckin Bell has been robbed recently.");
return 1;
}
if(rrand <= 20)
{
SendClientMessage(playerid,COLOR_ERROR,"Cluckin Bell robbery failed.");
DownCluckinBellRobbedRecently =320;
return 1;
}
DownCluckinBellRobbedRecently =320;
RobbingDownCluckinBell[playerid] =25;
IncreaseWantedLevel(playerid,4);
SetProgressBarValue(robbery[playerid],RobbingDownCluckinBell[playerid]);
ShowProgressBarForPlayer(playerid,robbery[playerid]);
format(string,sizeof(string),"~p~~n~~n~~n~~n~Robbing Cluckin Bell.~n~~r~Finish Robbery in: %d seconds.",RobbingDownCluckinBell[playerid]);
GameTextForPlayer(playerid,string,3000,3);
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Cluckin Bell! Get To Cluckin Bell and arrest the suspect.",PlayerName(playerid),playerid);
SendClientMessageToAllCops(string);
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Cluckin Bell ..",PlayerName(playerid),playerid);
SendClientMessageToAll(COLOR_RED,string);
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Cluckin Bell ..",PlayerName(playerid),playerid);
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
return 1;
}
return 1;
}
return 1;
}