/respawn
#1

is it possible to make something, when i type /respawn, the cars at a garage will be respawned?
Reply
#2

In which garages?

Btw. you mean respawning cars to the coords which you placed in your ***.pwn?
Reply
#3

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

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

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

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)