18.11.2011, 02:40
Quote:
pawn Код:
|
pawn Код:
if(!IsPlayerInAnyVehicle(playerid)) return 1;
{
AddVehicleComponent(VehicleID ,1010);
RepairVehicle(VehicleID);
return 1;
}
Idente seus cуdigos para obter melhores resultados.
@Topic
Ativando
Topo:
pawn Код:
#define HOLDING(%0) \
((newkeys & (%0)) == (%0))
#define RELEASED(%0) \
(((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
pawn Код:
if(HOLDING(KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new Veiculo = GetPlayerVehicleID(playerid);
AddVehicleComponent(Veiculo, 1010);
return 1;
}
}
OnPlayerKeyStateChange:
pawn Код:
if(RELEASED(KEY_FIRE))
{
if(IsPlayerInAnyVehicle(playerid))
{
new Veiculo = GetPlayerVehicleID(playerid);
RemoveVehicleComponent(Veiculo, 1010);
return 1;
}
}