How can i spawn a specific player in a specific vehicle ? -
AlbanianGuy - 16.01.2010
How can i spawn a specific player in a specific vehicle ? Or like hte soldier in a tank and the tero in a car ? I hope i get help . Thank You !
Re: How can i spawn a specific player in a specific vehicle ? -
Miguel - 16.01.2010
We need a vehicle
pawn Код:
CreateVehicle(modelif, x.x, y.y, z.z, a.a, color1, color2, respawn_delay);
With this one you put players in created vehicles.
pawn Код:
PutPlayerInVehicle(playerid, v1, 0); // playerid == player, v1 == vehicle, 0 == seatid
Re: How can i spawn a specific player in a specific vehicle ? -
AlbanianGuy - 16.01.2010
Quote:
Originally Posted by SAWC™
We need a vehicle
pawn Код:
CreateVehicle(modelif, x.x, y.y, z.z, a.a, color1, color2, respawn_delay);
With this one you put players in created vehicles.
pawn Код:
PutPlayerInVehicle(playerid, v1, 0); // playerid == player, v1 == vehicle, 0 == seatid
|
so u meant i put hte vehicle id to the model and the coordiantes , and the to put the player there , i have to put hte skin id ?
Re: How can i spawn a specific player in a specific vehicle ? -
AlbanianGuy - 16.01.2010
so waht can i do?
Re: How can i spawn a specific player in a specific vehicle ? -
jameskmonger - 16.01.2010
Skin id? YOU PUT THE SEAT ID.
Right, at the top of your script, put this:
Then in OnGameModeInit, put this:
pawn Код:
spawncar = CreateVehicle(ModelID, COORD X, COORD Y, COORD Z, COORD A, Car Color 1, Car Color 2, 1);
To find the modelid, go here:
https://sampwiki.blast.hk/wiki/Category:Vehicle
To find the Car Colors 1 and 2, go here:
https://sampwiki.blast.hk/wiki/Color_ID
Then, in OnPlayerSpawn, put this:
pawn Код:
PutPlayerInVehicle(playerid,spawncar,1);
Re: How can i spawn a specific player in a specific vehicle ? -
AlbanianGuy - 16.01.2010
Quote:
Originally Posted by jameskmonger
Skin id? YOU PUT THE SEAT ID.
Right, at the top of your script, put this:
Then in OnGameModeInit, put this:
pawn Код:
spawncar = CreateVehicle(ModelID, COORD X, COORD Y, COORD Z, COORD A, Car Color 1, Car Color 2, 1);
To find the modelid, go here:
https://sampwiki.blast.hk/wiki/Category:Vehicle
To find the Car Colors 1 and 2, go here:
https://sampwiki.blast.hk/wiki/Color_ID
Then, in OnPlayerSpawn, put this:
pawn Код:
PutPlayerInVehicle(playerid,spawncar,1);
|
i did it and the player does spawn at the vehicle , but the only thing wrong is htat , the car doesnt move , doesnt respond , or anything. .. and another thing is when u get out of the car , the game crashes, now can u do anything about it ?
Re: How can i spawn a specific player in a specific vehicle ? -
[HiC]TheKiller - 16.01.2010
Quote:
Originally Posted by jameskmonger
Skin id? YOU PUT THE SEAT ID.
Right, at the top of your script, put this:
Then in OnGameModeInit, put this:
pawn Код:
spawncar = CreateVehicle(ModelID, COORD X, COORD Y, COORD Z, COORD A, Car Color 1, Car Color 2, 1);
To find the modelid, go here:
https://sampwiki.blast.hk/wiki/Category:Vehicle
To find the Car Colors 1 and 2, go here:
https://sampwiki.blast.hk/wiki/Color_ID
Then, in OnPlayerSpawn, put this:
pawn Код:
PutPlayerInVehicle(playerid,spawncar,1);
|
pawn Код:
PutPlayerInVehicle(playerid,spawncar,1);
Puts the player in a passenger seat. Try this:
pawn Код:
PutPlayerInVehicle(playerid,spawncar,0);
Re: How can i spawn a specific player in a specific vehicle ? -
jameskmonger - 16.01.2010
Oh, I thought 1 was driver xDD
Re: How can i spawn a specific player in a specific vehicle ? -
AlbanianGuy - 16.01.2010
and another thing , look how to make the healht of the vehicle shown as the health as the player , and how to make the player die when exites th vehicle , and how to make a new player class no the first one , but a new one in a different vehicle ? not the same skin