Eject surfing players
#4

Quote:
Originally Posted by Abagail
Посмотреть сообщение
First and foremost, you can use the GetPlayerSurfingVehicleID function to check if the player is surfing on the roof. Example of checking if someone is:
1. Surfing on any car:
pawn Код:
if(GetPlayerSurfingVehicleID(playerid) != INVALID_VEHICLE_ID)
{
     // do things here
}
2. Surfing on a specific car
pawn Код:
if(GetPlayerSurfingVehicleID(playerid) == vehicleid)
{
     // do something here
}
Secondly, you can use the SetPlayerVelocity(or even SetPlayerPos) function to move the player off of the car. For example, you can slap the player into the air.

pawn Код:
new Float: x, Float: y, Float: z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z + 6.0);
All this I have to put them into my /eject command? or ?
Reply


Messages In This Thread
Eject surfing players - by GodLight - 30.11.2016, 18:06
Re: Eject surfing players - by Abagail - 30.11.2016, 18:23
Re: Eject surfing players - by DaniceMcHarley - 30.11.2016, 18:57
Re: Eject surfing players - by GodLight - 02.12.2016, 17:28

Forum Jump:


Users browsing this thread: 1 Guest(s)