How can i do...
#8

Save the vehicle ID & seat when the player exits the vehicle, and put him back in the vehicle when the state changes to PLAYER_STATE_ONFOOT.

pawn Код:
new veh_id[MAX_PLAYERS],
    veh_seat[MAX_PLAYERS];

public OnPlayerStateChange(playerid, newstate, oldstate)
{
    if(newstate == PLAYER_STATE_ONFOOT)
    {
        if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
        {
            PutPlayerInVehicle(playerid, veh_id[playerid], veh_seat[playerid]);
        }
    }
    return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
    veh_id[playerid] = vehicleid;
    veh_seat[playerid] = GetPlayerVehicleSeat(playerid);
    return 1;
}
Reply


Messages In This Thread
How can i do... - by nuriel8833 - 12.07.2010, 12:27
Re: How can i do... - by Mauzen - 12.07.2010, 16:15
Re: How can i do... - by oliverrud - 12.07.2010, 16:18
Re: How can i do... - by Jeffry - 12.07.2010, 16:21
Re: How can i do... - by DeathOnaStick - 12.07.2010, 16:22
Re: How can i do... - by Vince - 12.07.2010, 16:22
Re: How can i do... - by nuriel8833 - 15.07.2010, 16:05
Re: How can i do... - by Finn - 15.07.2010, 16:25

Forum Jump:


Users browsing this thread: 2 Guest(s)