Vehicle Anti-Spam
#4

**Written on the forum**
pawn Код:
// Top of your script.
new bool:g_IsSpawnedVehicle[ MAX_VEHICLES char ];

// In spawning command.
new vehicleid = AddStaticVehicleEx( 552, 0.0000, 0.0000, 0.0000, 0.0000, -1, -1, 60 );
g_IsSpawnedVehicle{ vehicleid } = true;

// under OnVehicleSpawn
if ( g_IsSpawnedVehicle{ vehicleid } )
{
    DestroyVehicle( vehicleid );
    g_IsSpawnedVehicle{ vehicleid } = false;
}
This is just an example to get you going. If the player does not enter the vehicle it will not respawn and not be deleted. To fix this, put them in the vehicle as it is spawned and if they leave within the first 5 seconds, just destroy the vehicle then.
Reply


Messages In This Thread
Vehicle Anti-Spam - by lamarr007 - 07.01.2012, 16:34
Re: Vehicle Anti-Spam - by BlackWolf120 - 07.01.2012, 16:36
Re: Vehicle Anti-Spam - by lamarr007 - 07.01.2012, 16:38
Re: Vehicle Anti-Spam - by Psymetrix - 07.01.2012, 17:04
Re: Vehicle Anti-Spam - by lamarr007 - 07.01.2012, 17:18
Re: Vehicle Anti-Spam - by BlackWolf120 - 07.01.2012, 17:34
Re: Vehicle Anti-Spam - by lamarr007 - 07.01.2012, 17:39
Re: Vehicle Anti-Spam - by Virtual1ty - 07.01.2012, 17:50
Re: Vehicle Anti-Spam - by lamarr007 - 07.01.2012, 17:58
Re: Vehicle Anti-Spam - by Virtual1ty - 07.01.2012, 18:01

Forum Jump:


Users browsing this thread: 2 Guest(s)