/respawn - 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: /respawn (
/showthread.php?tid=106449)
/respawn -
PANNA - 03.11.2009
is it possible to make something, when i type /respawn, the cars at a garage will be respawned?
Re: /respawn -
Jeffry - 03.11.2009
In which garages?
Btw. you mean respawning cars
to the coords which you placed in your ***.pwn?
Re: /respawn -
PANNA - 03.11.2009
Quote:
Originally Posted by Jeffry
In which garages?
Btw. you mean respawning cars to the coords which you placed in your ***.pwn?
|
yea like i have 3 cars at lsair and they are all away, somewhere in sanandreas, i type /respawn and the cars will be respawned
Re: /respawn -
MadeMan - 03.11.2009
Yes it is.
Make new variables to save vehicleids.
pawn Код:
new Car1;
new Car2;
new Car3;
Where you create these cars with AddStaticVehicle or CreateVehicle (usually under OnGameModeInit), save the ids.
pawn Код:
Car1 = AddStaticVehicle(....
Car2 = AddStaticVehicle(....
Car3 = AddStaticVehicle(....
Make the command under OnPlayerCommandText.
pawn Код:
if(strcmp(cmdtext, "/respawn", true) == 0)
{
SetVehicleToRespawn(Car1);
SetVehicleToRespawn(Car2);
SetVehicleToRespawn(Car3);
return 1;
}
Re: /respawn -
PANNA - 03.11.2009
Quote:
Originally Posted by MadeMan
Yes it is.
Make new variables to save vehicleids.
pawn Код:
new Car1; new Car2; new Car3;
|
what i need to do with that one?
Re: /respawn -
MadeMan - 03.11.2009
Quote:
Originally Posted by PANNA
Quote:
Originally Posted by MadeMan
Yes it is.
Make new variables to save vehicleids.
pawn Код:
new Car1; new Car2; new Car3;
|
what i need to do with that one?
|
Add where others are at the beginning of the script. I'm sure you have some other new there.