SA-MP Forums Archive
[HELP] Remove Vehicle when i spawn it 2 times - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Remove Vehicle when i spawn it 2 times (/showthread.php?tid=67794)



[HELP] Remove Vehicle when i spawn it 2 times - RyDeR` - 04.03.2009

Hi.
I am mading an Little adminscript but when i typ /car [id] the car will come but when i typ it 2 times will the first vehicle not remove how must i do that?


Re: [HELP] Remove Vehicle when i spawn it 2 times - Wiejeben - 04.03.2009

I think that it is for that you can't spam the server with vehicle spawns!
(But, i don't know how to remove that XD)


Re: [HELP] Remove Vehicle when i spawn it 2 times - Mikep - 04.03.2009

Could you possible get better at English?

Quote:

I am mading an Little adminscript




Re: [HELP] Remove Vehicle when i spawn it 2 times - ICECOLDKILLAK8 - 04.03.2009

pawn Код:
// Top of script
new LastSpawnedVehicle[MAX_PLAYERS];

// OnPlayerConnect
LastSpawnedVehicle[playerid] = 999;

// In you vehicle spawn command
if(LastSpawnedVehicle[playerid] != 999)
{
DestroyVehicle(LastSpawnedVehicle[playerid]);
}
LastSpawnedVehicle[playerid] = AddStaticVehicle/CreateVehicle(bla,bla,bla);
Not tested it but it should work


Re: [HELP] Remove Vehicle when i spawn it 2 times - RyDeR` - 04.03.2009

Quote:
Originally Posted by Mikep
Could you possible get better at English?

Quote:

I am mading an Little adminscript

Sory man. My English is not so very well
Normaly I use ****** Translator hehe


Re: [HELP] Remove Vehicle when i spawn it 2 times - RyDeR` - 04.03.2009

Quote:
Originally Posted by JeNkStAX
pawn Код:
// Top of script
new LastSpawnedVehicle[MAX_PLAYERS];

// OnPlayerConnect
LastSpawnedVehicle[playerid] = 999;

// In you vehicle spawn command
if(LastSpawnedVehicle[playerid] != 999)
{
DestroyVehicle(LastSpawnedVehicle[playerid]);
}
LastSpawnedVehicle[playerid] = AddStaticVehicle/CreateVehicle(bla,bla,bla);
Not tested it but it should work
Thanks