07.07.2010, 16:59
Ok I'm having some problems with too many cars spawning at some checkpoints. I have a map where players use different cars. Once they drive into a checkpoint it deletes their car and puts them into a different one. That works fine, but for some reason after the servers been running for awhile and you drive to the checkpoints on that map you'll see many cars spawned around it. Here's a pic, http://i28.tinypic.com/rmkzlu.png
There's also a checkpoint infront. I just want it so the extra cars don't spawn. Here's the code I have for this and the rest of the checkpoints. Any help would be great thanks.
There's also a checkpoint infront. I just want it so the extra cars don't spawn. Here's the code I have for this and the rest of the checkpoints. Any help would be great thanks.
pawn Код:
if (gCheckpoint[0] == checkpointid)
{
new currentveh;
currentveh = GetPlayerVehicleID(playerid);
DestroyVehicle(currentveh);
new Float:X,Float:Y,Float:Z,Float:A;
GetPlayerPos(playerid,X,Y,Z);
GetPlayerFacingAngle(playerid,A);
SpawnedVehicles[playerid] = CreateVehicle(510,X,Y,Z,A,-1,-1,-1);
SetVehicleVirtualWorld(SpawnedVehicles[playerid], GetPlayerVirtualWorld(playerid));
PutPlayerInVehicle(playerid,SpawnedVehicles[playerid],0);
TogglePlayerDynamicCP(playerid, checkpointid, false);
}