31.08.2015, 22:13
Hello, so my question is if it is possible to get the driver playerid from the vehicleid of the vehicle he is driving?I hope you understood what I meant to say. Thanks for reading.
new Driver[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
Driver[playerid] == false;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
Driver[playerid] == true;
}
if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
{
Driver[playerid] == false;
}
return 1;
}
IsDriver(playerid)
{
return Driver[playerid];
}