Press 2 To Repair Help
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
printf("key: %d",newkeys);
....
rest
press W and 2 together then print

pawn Код:
#define PRESSED(%0) \
    (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(PRESSED(key number))
    {
        if(!GetPlayerVehicleSeat(playerid))
        {
            new Float:z,veh;
            veh = GetPlayerVehicleID(playerid);
            GetVehicleZAngle(veh, z);
            SetVehicleZAngle(veh, z+0.1);
            //SetVehicleHealth(veh,1000.0);
            RepairVehicle(veh);
            AddVehicleComponent(veh,1010);
            return 1;
        }
    }
    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)