18.03.2013, 02:31
Im wondering if it is possible to create an object and put a timer that it will dissapear after lets say 30 seconds? and in that case how can i make it?
This is the command i want to put out an object but im not sure how i can make it and also i dont know how to make it with timer so please help me with this.
This is the command i want to put out an object but im not sure how i can make it and also i dont know how to make it with timer so please help me with this.
pawn Код:
if(strcmp(cmd, "/refillarmory", true) == 0)
{
if(PlayerInfo[playerid][pJob] == 16)
{
if(PlayerInfo[playerid][pArmoryrefill] == 1)
{
new tmpcar = GetPlayerVehicleID(playerid);
if(IsPlayerInRangeOfPoint(playerid, 15, 1567.2455,-1691.3341,5.8906))
{
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 delivered the armory equipment to the Police Department");
SendClientMessage(playerid, TEAM_AZTECAS_COLOR, "* You have been rewarded with 2.500.");
PlayerInfo[playerid][pArmoryrefill] = 0;
SafeGivePlayerMoney(playerid, 2500);
Armory[ARMOUR] = 15;
Armory[MP5] = 20;
Armory[SHOTGUN] = 20;
Armory[SHIELD] = 15;
CreateDynamicObject(3066,-69.5999985,-1124.6999512,1.1000000,0.0000000,0.0000000,65.5000000);
//Can i do it like this, and then just put a timer to remove it after 30 seconds?
}
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 dont have any armory equipment in your car");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not a Trucker!");
}
return 1;
}