#1

I use this code to rob places , but while i'm walking in the street with keys "W" "A" "S" "D" and Space , it says You are not in the checkpoint of anywhere you can rob.

PHP код:
public OnPlayerKeyStateChange(playeridnewkeysoldkeys)
{
    new 
string[128];
    if(
newkeys == KEY_LOOK_BEHIND)
    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)
    {
         
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_Ammunation && getCheckpointType(playerid) != CP_GayDarMain &&
    
getCheckpointType(playerid) != CP_ZeroMain && getCheckpointType(playerid) != CP_MistysMain &&
    
getCheckpointType(playerid) != CP_GYM && getCheckpointType(playerid) != CP_School &&
    
getCheckpointType(playerid) != CP_WangCars && getCheckpointType(playerid) != CP_Train &&
    
getCheckpointType(playerid) != CP_Barbers && getCheckpointType(playerid) != CP_PizzaMain &&
    
getCheckpointType(playerid) != CP_ZipMain && getCheckpointType(playerid) != CP_VictimMain &&
    
getCheckpointType(playerid) != CP_BincoMain && getCheckpointType(playerid) != CP_CityHallMain)
    {
        
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_BurgerShotMain)
    {
        if(
zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name])
        {
            if(
GarciaBurgerShotRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Garcia Burger Shot has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Garcia Burger Shot robbery failed.");
                
GarciaBurgerShotRobbedRecently =320;
                return 
1;
            }
            
GarciaBurgerShotRobbedRecently =320;
            
RobbingGarciaBurgerShot[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGarciaBurgerShot[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG_STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Garcia 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(
zones[current_zone][zone_name] == zones[162][zone_name])
        {
            if(
JHBurgerShotRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Juniper Hollow Burger Shot has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Juniper Hollow Burger Shot robbery failed.");
                
JHBurgerShotRobbedRecently =320;
                return 
1;
            }
            
JHBurgerShotRobbedRecently =320;
            
RobbingJHBurgerShot[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingJHBurgerShot[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG_STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Juniper Hollow 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(
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(
DownBurgerShotRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Downtown Burger Shot has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Downtown Burger Shot robbery failed.");
                
DownBurgerShotRobbedRecently =320;
                return 
1;
            }
            
DownBurgerShotRobbedRecently =320;
            
RobbingDownBurgerShot[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Burger Shot.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingDownBurgerShot[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_BURGERSHOT,DIALOG_STYLE_MSGBOX,"{FF0000}Burger Shot Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Downtown 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(
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(
DownZipRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Downtown Zip has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Downtown Zip robbery failed.");
                
DownZipRobbedRecently =320;
                return 
1;
            }
            
DownZipRobbedRecently =320;
            
RobbingDownZip[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Zip.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingDownZip[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_ZIP,DIALOG_STYLE_MSGBOX,"{FF0000}Zip Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Downtown 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;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_BincoMain)
    {
        if(
zones[current_zone][zone_name] == zones[161][zone_name])
        {
            if(
JHBincoRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Juniper Hill Binco has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Juniper Hill Binco robbery failed.");
                
JHBincoRobbedRecently =320;
                return 
1;
            }
            
JHBincoRobbedRecently =320;
            
RobbingJHBinco[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Binco.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingJHBinco[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_BINCO,DIALOG_STYLE_MSGBOX,"{FF0000}Binco Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Juniper Hill 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;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_VictimMain)
    {
        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(
DownVictimRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Downtown Victim has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Downtown Victim robbery failed.");
                
DownVictimRobbedRecently =320;
                return 
1;
            }
            
DownVictimRobbedRecently =320;
            
RobbingDownVictim[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Victim.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingDownVictim[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_VICTIM,DIALOG_STYLE_MSGBOX,"{FF0000}Victim Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Downtown Victim! Get To Victim and arrest the suspect.",PlayerName(playerid),playerid);
            
SendClientMessageToAllCops(string);
            
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Victim ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Victim ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_PizzaMain)
    {
        if(
zones[current_zone][zone_name] == zones[96][zone_name] || zones[current_zone][zone_name] == zones[97][zone_name] ||
        
zones[current_zone][zone_name] == zones[98][zone_name])
        {
            if(
EsplanadePizzaRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Esplanade Well Stacked Pizza has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Esplanade Well Stacked Pizza robbery failed.");
                
EsplanadePizzaRobbedRecently =320;
                return 
1;
            }
            
EsplanadePizzaRobbedRecently =320;
            
RobbingEsplanadePizza[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Well Stacked Pizza.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingEsplanadePizza[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_PIZZA,DIALOG_STYLE_MSGBOX,"{FF0000}Well Stacked Pizza Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Esplanade 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(
zones[current_zone][zone_name] == zones[102][zone_name])
        {
            if(
FinancialPizzaRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Financial Well Stacked Pizza has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Financial Well Stacked Pizza robbery failed.");
                
FinancialPizzaRobbedRecently =320;
                return 
1;
            }
            
FinancialPizzaRobbedRecently =320;
            
RobbingFinancialPizza[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Well Stacked Pizza.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingFinancialPizza[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_PIZZA,DIALOG_STYLE_MSGBOX,"{FF0000}Well Stacked Pizza Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Financial 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;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_Ammunation)
    {
        if(
zones[current_zone][zone_name] == zones[241][zone_name] || zones[current_zone][zone_name] == zones[242][zone_name] ||
        
zones[current_zone][zone_name] == zones[243][zone_name])
        {
            if(
AmmunationRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Ammunation 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 Ammunation. Check /robskill to see what you can rob.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Ammunation robbery failed.");
                
AmmunationRobbedRecently =320;
                return 
1;
            }
            
AmmunationRobbedRecently =320;
            
RobbingAmmunation[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Ammunation.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingAmmunation[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_AMMUNATION,DIALOG_STYLE_MSGBOX,"{FF0000}Ammunation Robbery",string,"Ok","Cancel");
            
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_Jizzys)
    {
        if(
JizzysRobbedRecently >= 1)
        {
            
SendClientMessage(playerid,COLOR_ERROR,"Jizzy's 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 Jizzy's. Check /robskill to see what you can rob.");
            return 
1;
        }
        if(
rrand <= 30)
        {
            
SendClientMessage(playerid,COLOR_ERROR,"Jizzy's robbery failed.");
            
JizzysRobbedRecently =320;
            return 
1;
        }
        
JizzysRobbedRecently =320;
        
RobbingJizzys[playerid] =25;
        
IncreaseWantedLevel(playerid,4);
        
IncreasePlayerScore(playerid,1);
        
format(string,sizeof(string),"Robbing Jizzy's.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingJizzys[playerid]);
        
ShowPlayerDialog(playerid,DIALOG_JIZZYS,DIALOG_STYLE_MSGBOX,"{FF0000}Jizzy's Robbery",string,"Ok","Cancel");
        
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Jizzy's! Get To Jizzy's and arrest the suspect.",PlayerName(playerid),playerid);
        
SendClientMessageToAllCops(string);
        
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Jizzy's ..",PlayerName(playerid),playerid);
        
SendClientMessageToAll(COLOR_RED,string);
        
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Jizzy's ..",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] < 20)
        {
            
SendClientMessage(playerid,COLOR_ERROR,"You must have a robbing skill level of 20 to rob the City Hall. Check /robskill to see what you can rob.");
            return 
1;
        }
        if(
rrand <= 30)
        {
            
SendClientMessage(playerid,COLOR_ERROR,"City Hall robbery failed.");
            
CityHallRobbedRecently =320;
            return 
1;
        }
        
CityHallRobbedRecently =320;
        
RobbingCityHall[playerid] =25;
        
IncreaseWantedLevel(playerid,4);
        
IncreasePlayerScore(playerid,1);
        
format(string,sizeof(string),"Robbing City Hall.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingCityHall[playerid]);
        
ShowPlayerDialog(playerid,DIALOG_CITYHALL,DIALOG_STYLE_MSGBOX,"{FF0000}City Hall Robbery",string,"Ok","Cancel");
        
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(
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(
BarbersRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Barbers has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Barbers robbery failed.");
                
BarbersRobbedRecently =320;
                return 
1;
            }
            
BarbersRobbedRecently =320;
            
RobbingBarbers[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Barbers.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingBarbers[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_BARBERS,DIALOG_STYLE_MSGBOX,"{FF0000}Barbers Robbery",string,"Ok","Cancel");
            
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;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_Train)
    {
        if(
zones[current_zone][zone_name] == zones[47][zone_name] || zones[current_zone][zone_name] == zones[48][zone_name])
        {
            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 <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Train Station robbery failed.");
                
TrainRobbedRecently =320;
                return 
1;
            }
            
TrainRobbedRecently =320;
            
RobbingTrain[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Train Station.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingTrain[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_TRAIN,DIALOG_STYLE_MSGBOX,"{FF0000}Train Station Robbery",string,"Ok","Cancel");
            
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;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_WangCars)
    {
        if(
zones[current_zone][zone_name] == zones[47][zone_name] || zones[current_zone][zone_name] == zones[48][zone_name])
        {
            if(
WangRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Wang 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 Wang Cars. Check /robskill to see what you can rob.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Wang Cars robbery failed.");
                
WangRobbedRecently =320;
                return 
1;
            }
            
WangRobbedRecently =320;
            
RobbingWang[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Wang Cars.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingWang[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_WANGCARS,DIALOG_STYLE_MSGBOX,"{FF0000}Wang Cars Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Wang Cars! Get To Wang Cars and arrest the suspect.",PlayerName(playerid),playerid);
            
SendClientMessageToAllCops(string);
            
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Wang Cars ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Wang Cars ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_GYM)
    {
        if(
zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name])
        {
            if(
GYMRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The GYM has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"GYM robbery failed.");
                
GYMRobbedRecently =320;
                return 
1;
            }
            
GYMRobbedRecently =320;
            
RobbingGYM[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing GYM.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGYM[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_GYM,DIALOG_STYLE_MSGBOX,"{FF0000}GYM Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the 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 the GYM ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the GYM ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_School)
    {
        if(
zones[current_zone][zone_name] == zones[47][zone_name] || zones[current_zone][zone_name] == zones[48][zone_name])
        {
            if(
SchoolRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Driving School has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Driving School robbery failed.");
                
SchoolRobbedRecently =320;
                return 
1;
            }
            
SchoolRobbedRecently =320;
            
RobbingSchool[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Driving School.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingSchool[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_SCHOOL,DIALOG_STYLE_MSGBOX,"{FF0000}Driving School Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Driving School! Get to the Driving School and arrest the suspect.",PlayerName(playerid),playerid);
            
SendClientMessageToAllCops(string);
            
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at the Driving School ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at the Driving School ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        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(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Gay Dar Station robbery failed.");
                
GayDarRobbedRecently =320;
                return 
1;
            }
            
GayDarRobbedRecently =320;
            
RobbingGayDar[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Gay Dar Station.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingGayDar[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_GAYDAR,DIALOG_STYLE_MSGBOX,"{FF0000}Gay Dar Station Robbery",string,"Ok","Cancel");
            
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_ZeroMain)
    {
        if(
zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name])
        {
            if(
ZeroRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Zero's has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Zero's robbery failed.");
                
ZeroRobbedRecently =320;
                return 
1;
            }
            
ZeroRobbedRecently =320;
            
RobbingZero[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Zero's.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingZero[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_ZERO,DIALOG_STYLE_MSGBOX,"{FF0000}Zero's Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Zero's! Get To Zero's and arrest the suspect.",PlayerName(playerid),playerid);
            
SendClientMessageToAllCops(string);
            
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Zero's ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Zero's ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_MistysMain)
    {
        if(
zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name])
        {
            if(
MistysRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Misty's has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Misty's robbery failed.");
                
MistysRobbedRecently =320;
                return 
1;
            }
            
MistysRobbedRecently =320;
            
RobbingMistys[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Misty's.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingMistys[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_MISTYS,DIALOG_STYLE_MSGBOX,"{FF0000}Misty's Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob Misty's! Get To Misty's and arrest the suspect.",PlayerName(playerid),playerid);
            
SendClientMessageToAllCops(string);
            
format(string,sizeof(string),"[ROBBERY] %s(%d) has begun a robbery at Misty's ..",PlayerName(playerid),playerid);
            
SendClientMessageToAll(COLOR_RED,string);
            
format(string,sizeof(string),"4[ROBBERY] %s(%d) has begun a robbery at Misty's ..",PlayerName(playerid),playerid);
            
IRC_GroupSay(gGroupID,IRC_CHANNEL,string);
            return 
1;
        }
        return 
1;
    }
    if(
getCheckpointType(playerid) == CP_CluckinBellMain)
    {
        if(
zones[current_zone][zone_name] == zones[241][zone_name] || zones[current_zone][zone_name] == zones[242][zone_name] ||
        
zones[current_zone][zone_name] == zones[243][zone_name])
        {
            if(
OceanCluckinBellRobbedRecently >= 1)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"The Ocean Flats Cluckin Bell has been robbed recently.");
                return 
1;
            }
            if(
rrand <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Ocean Flats Cluckin Bell robbery failed.");
                
OceanCluckinBellRobbedRecently =320;
                return 
1;
            }
            
OceanCluckinBellRobbedRecently =320;
            
RobbingOceanCluckinBell[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Cluckin Bell.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingOceanCluckinBell[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_CLUCKINBELL,DIALOG_STYLE_MSGBOX,"{FF0000}Cluckin Bell Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Ocean Flats 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 <= 30)
            {
                
SendClientMessage(playerid,COLOR_ERROR,"Downtown Cluckin Bell robbery failed.");
                
DownCluckinBellRobbedRecently =320;
                return 
1;
            }
            
DownCluckinBellRobbedRecently =320;
            
RobbingDownCluckinBell[playerid] =25;
            
IncreaseWantedLevel(playerid,4);
            
IncreasePlayerScore(playerid,1);
            
format(string,sizeof(string),"Robbing Cluckin Bell.\nFinish Robbery in: %d seconds.\nPolice are on the way.",RobbingOceanCluckinBell[playerid]);
            
ShowPlayerDialog(playerid,DIALOG_CLUCKINBELL,DIALOG_STYLE_MSGBOX,"{FF0000}Cluckin Bell Robbery",string,"Ok","Cancel");
            
format(string,sizeof(string),"[POLICE RADIO] Suspect %s(%d) has begun to rob the Downtown 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;

Reply
#2

show
PHP код:
IsPlayerInCheckpoint 
Reply
#3

instead of doing that. put it as a command.

Example
pawn Код:
if(newkeys == KEY_LOOK_BEHIND) return dcmd_robstore(playerid, ""); //i know it :) as i used SFCRRPG before
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)