You can't leave car
#1

Hey everyone, how to make a player could never get out of the car?

Sorry for bad english...
Reply
#2

in the callback OnPlayerExitVehicle
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
PutPlayerInVehicle(playerid, vehicleid, 0);
Reply
#3

you cannot make a system like the player never exits a car insted you can check if the player exited the car then teleport the player back to the car or you can kill the player if he isnt in the car
EDIT:what the hell man got late the third time today
Reply
#4

Use OnPlayerExitVehicle callback to detect if the player has left the vehicle and once he has left the vehicle use PutPlayerInVehicle to put the player back inside. You might also want to save the player's seat in a global variable.
Reply
#5

Quote:
Originally Posted by [HK]Ryder[AN]
Посмотреть сообщение
in the callback OnPlayerExitVehicle
pawn Код:
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
PutPlayerInVehicle(playerid, vehicleid, 0);
Thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)