Vehicles States?
#4

pawn Код:
public OnPlayerStateChange( playerid, newstate, oldstate )
{
  if ( newstate == PLAYER_STATE_DRIVER ) TogglePlayerControllable( playerid, false );
  return 1;
}

//wherever you want to start it, say a keypress or a command
TogglePlayerControllable( playerid, true );
This will freeze the player every time he gets in a vehicle as the driver until you fire the command or the keypress which you want to start the vehicle again. There is no need to use variables or whatever here IMO as you use the state like you would the variable anyway.

Ofcourse this may conflict somewhere due to commands and features I don't know about (your script) but a quick fix could be made I'm sure.
Reply


Messages In This Thread
Vehicles States? - by almighty - 16.09.2009, 00:09
Re: Vehicles States? - by Backwardsman97 - 16.09.2009, 00:48
Re: Vehicles States? - by almighty - 16.09.2009, 03:02
Re: Vehicles States? - by Donny_k - 16.09.2009, 09:57

Forum Jump:


Users browsing this thread: 1 Guest(s)