14.08.2014, 11:49
i think it should be like this...
meanwhile your's is like this
you don't need to add culry bracket after "if" statement with a "return"
Sorry for my bad english
pawn Код:
CMD:robpizza(playerid, params[])
{
if(!IsPlayerInDynamicCP(playerid, CP_pizza)) return SendClientMessage(playerid, COLOR_RED,"You are not in ....");
if(pizzarobbedrecently >=1) return SendClientMessage(playerid, COLOR_RED, "Well Stacked Pizza has been robbed recently"); //checking if tatoo shop has been robbed recently and then stop the command
ROBBING_PIZZA[playerid] = 60; // setting the robbery timer
pizzarobbedrecently =180; // Time the players needs to wait for starting an another robbery in the same place
return 1;
}
pawn Код:
CMD:robpizza(playerid, params[])
{
if(!IsPlayerInDynamicCP(playerid, CP_pizza)) return SendClientMessage(playerid, COLOR_RED,"You are not in ....");
{
if(pizzarobbedrecently >=1) //checking if tatoo shop has been robbed recently
{
SendClientMessage(playerid, COLOR_RED, "Well Stacked Pizza has been robbed recently"); // sending error message
}
ROBBING_PIZZA[playerid] = 60; // setting the robbery timer
pizzarobbedrecently =180; // Time the players needs to wait for starting an another robbery in the same place
}
return 1;
}
Sorry for my bad english
