Jump to content

function for ejecting someone from a vehicle


Ascla

Recommended Posts

Hey all,

I need your help. I need a function for ejecting someone from a vehicle but I can't find it.

The function removePedFromVehicle() is not good for a rp server ... Cause i need to see the player going out from the vehicle by the door, and not by a teleport ..

Thanks and merry Christmas !

Link to comment

it returned this error

Bad 'player' pointer @ 'setControlState'(1)

for me, then i did this

setControlState ( player, "enter_exit", true ) 
outputChatBox("* i wrote something here",player,0,255,0) 
setTimer(setControlState ,1000,1,player,"enter_exit",true) 

you can even try it on client side ( you can use trigger if the script is serversided )

setControlState ( "enter_exit", true ) 

* Edit : sorry forgot to add the state name

Edited by Guest
Link to comment
setControlState ( player, "enter_exit", true ) 
outputChatBox("* i wrote something here",player,0,255,0) 
setTimer(setControlState,10000,1,player,true) 

This doesn't make sense. And is the player element defined where you tested it?

This funtion is client-side only, you can't use it server-side.

Link to comment
setControlState ( player, "enter_exit", true ) 
outputChatBox("* i wrote something here",player,0,255,0) 
setTimer(setControlState,10000,1,player,true) 

This doesn't make sense. And is the player element defined where you tested it?

This funtion is client-side only, you can't use it server-side.

say that to the wiki not to me , cause it's written that it's Client and Server function with a blue color

Link to comment
setControlState ( player, "enter_exit", true ) 
outputChatBox("* i wrote something here",player,0,255,0) 
setTimer(setControlState,10000,1,player,true) 

This doesn't make sense. And is the player element defined where you tested it?

This funtion is client-side only, you can't use it server-side.

say that to the wiki not to me , cause it's written that it's Client and Server function with a blue color

Em... You are right, i was thinking of setPedControlState wich is really client-side only) :oops:

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...