SA-MP Forums Archive
Help please! - 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 please! (/showthread.php?tid=189121)



Car spawner problem! - AlexXx95 - 10.11.2010

Hi there,I have a little problem. I use a Car spawner wich works like this /car [name/part of name].
Do you know what can i do when a player spawns a second vehicle the first one dissapaire?

Tanks, and i know my english sucks but I'm romanian.

Here is the car spawner"

http://solidfiles.com/d/7efad/

Tanks again!


Re: Car spawner problem! - AlexXx95 - 10.11.2010

somme help please


Re: Help please! - Bessensap - 10.11.2010

Make a global Variable
pawn Код:
new Playercar[MAX_PLAYERS];
then when he spawns the car:
pawn Код:
//othercodeothercode
DestroyVehicle(Playercar[playerid]);
Playercar[playerid] = CreateVehicle(/*his pos or whatever*/)
//othercodeothercode



Re: Help please! - AlexXx95 - 10.11.2010

Quote:
Originally Posted by Bessensap
Посмотреть сообщение
Make a global Variable
pawn Код:
new Playercar[MAX_PLAYERS];
then when he spawns the car:
pawn Код:
//othercodeothercode
DestroyVehicle(Playercar[playerid]);
Playercar[playerid] = CreateVehicle(/*his pos or whatever*/)
//othercodeothercode
and what i have to write here?
pawn Код:
/*his pos or whatever*/
because everything i put i have 7 warnings


Re: Help please! - Bessensap - 11.11.2010

https://sampwiki.blast.hk/wiki/CreateVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicle
https://sampwiki.blast.hk/wiki/AddStaticVehicleEx