Vehicle Respawner - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Vehicle Respawner (
/showthread.php?tid=462763)
Vehicle Respawner -
martoivanov - 08.09.2013
I have a /car command with model preview menu in a FS. When i try to respawn all vehicles, only these which are in the GM are respawned? Can someone help me? I want to respawn the cars in the FS too
pawn Код:
if(strcmp(cmd, "/respawnallcars", true) == 0) {
new bool:vehicleused[MAX_VEHICLES];
for(new i=0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i))
{
vehicleused[GetPlayerVehicleID(i)] = true;
}
}
for(new i=1; i < MAX_VEHICLES; i++)
{
if(!vehicleused[i])
{
SetVehicleToRespawn(i);
}
}
SendClientMessage(playerid, 0x32CD32, "balba!");
SendClientMessageToAll(0x32CD32, "sth!");
return 1;
}
The problem is that when i respawn the cars spawned by a dialog menu they are destroyed but from this menu - not
Re: Vehicle Respawner -
martoivanov - 08.09.2013
Forget this.. I want to destroy a vehicle with a timer which checks if it is empty or not? Can someone help me?