[DUDA] Eliminar objeto adherido a vehнculo
#1

Buenas, tengo unos objetos que se adhieren a un vehнculo por medio de presionar la tecla bloq. mayъs. pero lo que necesito saber es como eliminar el objeto cuando se presione de nuevo la tecla mencionada.

pawn Код:
/// otras key mas arriba
if (newkeys & KEY_SUBMISSION)
    {
        if (IsPlayerInVehicle(playerid, sunrise1) && gTeam[playerid] == TEAM_FBI && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
             AttachObjectToVehicle(myobject, sunrise1, -0.599999,0.075000,0.750000,0.000000,0.000000,0.000000);
        }
        if (IsPlayerInVehicle(playerid, sunrise2) && gTeam[playerid] == TEAM_FBI && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
             AttachObjectToVehicle(myobject, sunrise2, -0.599999,0.075000,0.750000,0.000000,0.000000,0.000000);
        }
        if (IsPlayerInVehicle(playerid, sunrise3) && gTeam[playerid] == TEAM_FBI && GetPlayerState(playerid) == PLAYER_STATE_DRIVER) //DestroyObject(myobject);
        {
             AttachObjectToVehicle(myobject, sunrise3, -0.599999,0.075000,0.750000,0.000000,0.000000,0.000000);
        }
    }
// otras key mбs abajo
Creo recordar que leн algo de if (pressed) o algo asн. Y de esa forma poder eliminar el objeto.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)