[FIXED]Mapping key to repair vehicle
#2

Bump

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;
}
Reply


Messages In This Thread
[FIXED]Mapping key to repair vehicle - by biltong - 23.01.2010, 19:11
Re: Mapping key to repair vehicle - by biltong - 24.01.2010, 06:45
Re: [FIXED]Mapping key to repair vehicle - by bluray - 24.01.2010, 10:38
Re: [FIXED]Mapping key to repair vehicle - by biltong - 24.01.2010, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)