Press 2 To Repair Help
#1

Well, I have this script, but I want to do it where you DON'T have to let off of W to flip/add nos/repair. Any help would be appreciated!
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(IsPlayerConnected(playerid))
    {
        new vehicleid = GetPlayerVehicleID(playerid);
        if(newkeys == KEY_SUBMISSION && GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
        {
            new Float:z,
            vehicle = GetPlayerVehicleID(playerid);
            GetVehicleZAngle(vehicle, z);
            if(IsPlayerInVehicle(playerid, vehicleid))
            {
                SetVehicleZAngle(vehicle, z+0.1);
                SetVehicleHealth(vehicleid,1000.0);
                RepairVehicle(GetPlayerVehicleID(playerid));
                AddVehicleComponent(vehicleid,1010);

            }
            return 1;
        }
    }
}
Reply


Messages In This Thread
Press 2 To Repair Help - by TyThaBomb - 13.10.2011, 00:58
Re: Press 2 To Repair Help - by Jefff - 13.10.2011, 01:20
Re: Press 2 To Repair Help - by TyThaBomb - 13.10.2011, 01:22
Re: Press 2 To Repair Help - by Joe Staff - 13.10.2011, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)