#2

pawn Код:
static
    PlayerQuieto[MAX_PLAYERS],
    VehiculoID[MAX_PLAYERS],
    AsientoID[MAX_PLAYERS];

public OnPlayerStateChange(playerid,newstate,oldstate)
{
    if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
    {
        if(PlayerQuieto[playerid] == 0)
        {
            VehiculoID[playerid] = GetPlayerVehicleID(playerid);
            AsientoID[playerid] = GetPlayerVehicleSeat(playerid);
        }
    }
    if(oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_PASSENGER)
    {
        if(PlayerQuieto[playerid] == 1)
        {
            PutPlayerInVehicle(playerid, VehiculoID[playerid], AsientoID[playerid]);
        }
    }
    return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
    VehiculoID[playerid] = 0;
    AsientoID[playerid] = 0;
    return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
    VehiculoID[killerid] = 0;
    AsientoID[killerid] = 0;
    return 1;
}
Reply


Messages In This Thread
Duda - by chucho - 28.08.2012, 18:51
Respuesta: Duda - by OTACON - 28.08.2012, 19:32
Respuesta: Duda - by Bu11Sh0t - 28.08.2012, 20:31
Respuesta: Duda - by OTACON - 28.08.2012, 21:13

Forum Jump:


Users browsing this thread: 1 Guest(s)