24.01.2010, 06:45
Bump
EDIT: Fixed it. It now looks like this:
EDIT: Fixed it. It now looks like this:
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(IsPlayerInAnyVehicle(playerid))
{
new nos = GetPlayerVehicleID(playerid);
if(Nitro(nos) && (oldkeys & 1 || oldkeys & 4))
{
RemoveVehicleComponent(nos, 1010);
AddVehicleComponent(nos, 1010);
return 1;
}
}
if(IsPlayerInAnyVehicle(playerid))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
{
if((newkeys & KEY_SUBMISSION) && !(oldkeys & KEY_SUBMISSION))
{
RepairVehicle(vehicleid);
SendClientMessage(playerid,COLOR_GREEN, "Your vehicle has been repaired.");
return 1;
}
}
else(SendClientMessage(playerid,COLOR_RED, "You're not in a vehicle!"));
}
return 1;
}