15.06.2010, 16:12
I want to put a timer on respawning a vehicle, like I input a command in a vehicle and then the vehicle gets vanished right at the moment I input the command and after the setted time, it gets respawned.
|
Originally Posted by ||123||
Please help me.
|
|
forward ReloadCars(); |
|
In OnGameModeInit() SetTimer("ReloadCars", 60000, 1); |
|
public ReloadCars(); { SendRconCommand("unloadfs"); SendRconCommand("loadfs"); } |
|
Originally Posted by Ihsan_Cingisiz
Quote:
that the server unloads it... Example : At the top of your script. Quote:
Quote:
Quote:
|
new cardestroytimer;
if(!strcmp(cmdtext,"/destroyvehicle",true,15)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,0xffffffaa,"This command can only be used in a vehicle");
new veh=GetPlayerVehicleID(playerid);
cardestroyertimer=SetTimerEx("destroycar", 300000,0,"d",veh);
return 1;
}
forward destroycar(vehicleid);
public destroycar(vehicleid)
{
SetVehicleToRespawn(veh);
return 1;
}