18.03.2013, 05:38
Ok, so i did like this
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?
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?
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;
}
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);