Alright, I found something similar, but I don't get it, maybe you could explain it in a simple way?
pawn Код:
CMD:robstore(playerid, params[])
{
new
string[ 256 ],
current_zone = player_zone[playerid]
;
if(pTeam[playerid] == TPolice || pTeam[playerid] == TArmy && IsPlayerLEO[playerid] == true) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": You can not rob a store while you are in Law Enforcement!");
if(IsPlayerInDynamicCP(playerid, rCheckpoints[7]))
{
if(zones[current_zone][zone_name] >= zones[93][zone_name] && zones[current_zone][zone_name] <= zones[95][zone_name]) //Espelanade East Tatoo Shop
{
if(RobbedRecently[TatooRobbedRecently] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][RobbingTatoo] = 20;
RobbedRecently[TatooRobbedRecently] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Tatoo Shop | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
}
if(IsPlayerInDynamicCP(playerid, rCheckpoints[9]))
{
if(zones[current_zone][zone_name] == zones[116][zone_name] || zones[current_zone][zone_name] == zones[117][zone_name]) // Garcia Gym
{
if(RobbedRecently[GymRobbedRecently] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][RobbingGym] = 20;
RobbedRecently[GymRobbedRecently] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Gym | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
}
if(IsPlayerInDynamicCP(playerid, rCheckpoints[10]))
{
if(zones[current_zone][zone_name] >= zones[96][zone_name] && zones[current_zone][zone_name] <= zones[98][zone_name]) //Espelanade North Well Stack Pizza
{
if(RobbedRecently[ WellStackPizzaRobbedRecently ][ 0 ] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][ RobbingWellStackPizza ][ 0 ] = 20;
RobbedRecently[ WellStackPizzaRobbedRecently][ 0 ] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Well Stack Pizza | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
if(zones[current_zone][zone_name] == zones[102][zone_name]) //Financial Well Stack Pizza
{
if(RobbedRecently[ WellStackPizzaRobbedRecently ][ 1 ] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][ RobbingWellStackPizza ][ 1 ]= 20;
RobbedRecently[WellStackPizzaRobbedRecently ][ 1 ] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Well Stack Pizza 1 | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
}
if(IsPlayerInDynamicCP(playerid, rCheckpoints[1]))
{
if(zones[current_zone][zone_name] >= zones[49][zone_name] && zones[current_zone][zone_name] <= zones[54][zone_name]) //Downton Cluckin Bell
{
if(RobbedRecently[ CluckinBellRobbedRecently ][ 0 ] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][ CluckinBell ][ 0 ] = 20;
RobbedRecently[ CluckinBellRobbedRecently ][ 0 ] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Cluckin Bell | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
if(zones[current_zone][zone_name] >= zones[233][zone_name] && zones[current_zone][zone_name] <= zones[236][zone_name]) //Ocean Flats Cluckin Bell
{
if(RobbedRecently[ CluckinBellRobbedRecently ][ 1 ] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][ CluckinBell ][ 1 ] = 20;
RobbedRecently[ CluckinBellRobbedRecently ][ 1 ] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Cluckin Bell 1 | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
if(zones[current_zone][zone_name] >= zones[93][zone_name] && zones[current_zone][zone_name] <= zones[95][zone_name]) //Espelanade East Cluckin Bell
{
if(RobbedRecently[ CluckinBellRobbedRecently ][ 2 ] >= 1) return SendClientMessage(playerid, COLOR_RED, "Error"COL_WHITE": This shop/store has been robbed recently, please try again later!");
Robbing[playerid][ CluckinBell ][ 2 ] = 20;
RobbedRecently[ CluckinBellRobbedRecently ][ 2 ] = 300;
format(string,sizeof(string),"[DISPATCH]"COL_GREY": There's a robbery in progress! Suspect: %s | Shop Name: Cluckin Bell 2 | Shop Location: %s",PlayerName(playerid), playerid, GetZoneName(playerid));
SendLEOMessage(string);
TextDrawShowForPlayer(playerid, RobberyTD[playerid]);
SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.2, 0, 0, 90, 0.5, 0.8, 0.8, 0.8);
ApplyAnimation(playerid, "SHOP", "ROB_Shifty", 3.0, 0, 0, 0, 0, 0, 1);
}
}
return 1;
}