29.03.2013, 22:33
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.
Creo recordar que leн algo de if (pressed) o algo asн. Y de esa forma poder eliminar el objeto.
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