SA-MP Forums Archive
[HELP!] With PAWNO! Plzzzz - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP!] With PAWNO! Plzzzz (/showthread.php?tid=244868)



[HELP!] With PAWNO! Plzzzz - nateykurgan - 28.03.2011

Ok Guys listen up again again again again again xDD ^^ ok help me i just wanna know on the CMDTEXT for example /repair fixes car.. ok and i wanna know how can i make a keyboard shortcut for that ? For Example when i press "2" on the keyboard it repairs instead of me writing /Repair anyone know how ?


Re: [HELP!] With PAWNO! Plzzzz - Fj0rtizFredde - 28.03.2011

Something like this should do it
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if (newkeys & KEY_SUBMISSION)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            RepairVehicle(GetPlayerVehicleID(playerid));
            SendClientMessage(playerid, 0xFFFFFFFF, "Your vehicle has been repaired!");
        }
    }
    return 1;
}