Posts: 144
Threads: 22
Joined: Jun 2017
Reputation:
0
Pawn Code:
CMD:respawncars(playerid, params[])
{
for(new i=0; i<MAX_VEHICLES; i++)
SetVehicleToRespawn(i);
SCMToAll(gelb,"Alle Autos wurden respawned.");
return 1;
}
When i type ingame. /respawncars the cars just disappear and don't respawn
Posts: 1,498
Threads: 110
Joined: Aug 2013
Код:
for(new i = GetVehiclePoolSize(); i > 0; i--)
{
SetVehicleToRespawn(i);
}
https://sampwiki.blast.hk/wiki/Function:SetVehicleToRespawn
Posts: 144
Threads: 22
Joined: Jun 2017
Reputation:
0
Doesn't work...
The Cars just disappear but don't respawn
Posts: 144
Threads: 22
Joined: Jun 2017
Reputation:
0
I have this in there:
public OnVehicleSpawn(vehicleid,playerid)
{
SetVehiclePos(vehicleid,vx,vy,vz);
SetVehicleZAngle(vehicleid,vr);
SetVehicleHealth(vehicleid,399);
return 1;
}
Because when a car explodes, it respawns where it exploded
Edit: Without it, it works..
But i still want this in there
Posts: 144
Threads: 22
Joined: Jun 2017
Reputation:
0
I already fixed it, thank you all <3
My Vehicles Spawn where they exploded, and i can respawn all cars, Thanks