SA-MP Forums Archive
OnPlayerStateChange - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerStateChange (/showthread.php?tid=305458)



OnPlayerStateChange - rati555 - 22.12.2011

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
   new newcar = GetPlayerVehicleID(playerid);
    if(oldstate == PLAYER_STATE_ONFOOT)
        {
  if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
   {
   if(VehicleInfo[newcar][vMemeber] == gTeam[playerid]) //
        {
    RemovePlayerFromVehicle(playerid);
        }
    }
}
    return 1;
}
doesn't removes player from vehicle
please help :S


Re: OnPlayerStateChange - Tee - 22.12.2011

pawn Код:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
    new newcar = GetPlayerVehicleID(playerid);
    if(newstate == PLAYER_STATE_DRIVER || PLAYER_STATE_PASSENGER)
    {
        if(VehicleInfo[newcar][vMemeber] == gTeam[playerid])
        {
            RemovePlayerFromVehicle(playerid);
        }
    }
    return 1;
}
Also what is stored in this variable VehicleInfo[newcar][vMemeber]?