[HELP] Remove Vehicle when i spawn it 2 times
#1

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?
Reply
#2

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)
Reply
#3

Could you possible get better at English?

Quote:

I am mading an Little adminscript

Reply
#4

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
Reply
#5

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
Reply
#6

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
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)