[Problem] Robbery / Checkpoint
#2

i think it should be like this...

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;
}
meanwhile your's is like this

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;
}
you don't need to add culry bracket after "if" statement with a "return"

Sorry for my bad english
Reply


Messages In This Thread
[Problem] Robbery / Checkpoint - by 123bob123 - 14.08.2014, 11:40
Re: [Problem] Robbery / Checkpoint - by AiRaLoKa - 14.08.2014, 11:49
Re: [Problem] Robbery / Checkpoint - by 123bob123 - 14.08.2014, 15:31
Re: [Problem] Robbery / Checkpoint - by 123bob123 - 14.08.2014, 16:20
Re: [Problem] Robbery / Checkpoint - by biker122 - 14.08.2014, 17:45
Re: [Problem] Robbery / Checkpoint - by 123bob123 - 14.08.2014, 19:36
Re: [Problem] Robbery / Checkpoint - by biker122 - 15.08.2014, 05:05
Re: [Problem] Robbery / Checkpoint - by 123bob123 - 15.08.2014, 15:45
Re: [Problem] Robbery / Checkpoint - by 123bob123 - 15.08.2014, 16:27
Re: [Problem] Robbery / Checkpoint - by biker122 - 15.08.2014, 17:06

Forum Jump:


Users browsing this thread: 3 Guest(s)