Need some help with the timer
#1

Ok, so i did like this
pawn Код:
if(strcmp(cmd, "/loadarmory", true) == 0)
    {
        if(PlayerInfo[playerid][pJob] == 16)
        {
            if(PlayerInfo[playerid][pArmoryrefill] == 0)
            {
                new tmpcar = GetPlayerVehicleID(playerid);
                if(IsPlayerInRangeOfPoint(playerid, 15, -65.3189,-1119.7914,1.0781))
                {
                    if(GetVehicleModel(tmpcar) == 433 || GetVehicleModel(tmpcar) == 440 || GetVehicleModel(tmpcar) == 514 || GetVehicleModel(tmpcar) == 428 || GetVehicleModel(tmpcar) == 403 || GetVehicleModel(tmpcar) == 515)
                    {
                        SendClientMessage(playerid, TEAM_GROVE_COLOR, "You have loaded your truck with armory equipment!");
                        SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "* The Government have paid the bill for loading armory equipment.");
                        PlayerInfo[playerid][pArmoryrefill] = 1;
                        RemoveObject(TemporaryArmoryCrateSF);
                        SetTimerEx("CreateDynamicObject",30*1000,false,"d",TemporaryArmoryCrateSF);
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_GREY, "You can't load with this vehicle!");
                    }
                }
                else
                {
                    SendClientMessage(playerid, COLOR_GREY, "You are NOT at the Armory loading place!");
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GREY, "You are already loaded.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_GREY, "You are not a Trucker!");
        }
        return 1;
    }
but i got some problem with it. I get no error when i complie and it removes the object but it dont spawn back.
I proberbly did wrong since its my first try on this but hey, you learn from misstakes right? so can i do like this?
pawn Код:
RemoveObject(TemporaryArmoryCrateSF);
                        SetTimerEx("CreateDynamicObject",30*1000,false,"d",TemporaryArmoryCrateSF);
i have no public or forward for the "CreateDynamicObject" cuz i didnt think that was needed since i use it for the other objects and they work fine but i might was wrong?
Reply


Messages In This Thread
Need some help with the timer - by Don_Cage - 18.03.2013, 05:38
Re: Need some help with the timer - by CBCandyBoy - 18.03.2013, 05:49
Re: Need some help with the timer - by Don_Cage - 18.03.2013, 05:54
Re: Need some help with the timer - by CBCandyBoy - 18.03.2013, 05:58
Re: Need some help with the timer - by Don_Cage - 18.03.2013, 06:06
Re: Need some help with the timer - by CBCandyBoy - 18.03.2013, 06:21
Re: Need some help with the timer - by Don_Cage - 18.03.2013, 06:36
Re: Need some help with the timer - by CBCandyBoy - 18.03.2013, 06:41
Re: Need some help with the timer - by Don_Cage - 18.03.2013, 07:15
Re: Need some help with the timer - by CBCandyBoy - 18.03.2013, 07:17

Forum Jump:


Users browsing this thread: 1 Guest(s)