05.09.2011, 21:49
Tente assim:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
if (newkeys & KEY_FIRE)
{
AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
else if (oldkeys & KEY_FIRE)
{
RemoveVehicleComponent(GetPlayerVehicleID(playerid), 1010);
}
}
return 1;
}