24.09.2011, 21:46
gKeys
*About*
Hey guys, since i was a bit bored and got some inspiration, i decided to make gKeys!
It is just like zcmd/gDialog, a shortcut with a easyer way of using player hotkeys!
*Callbacks*
*About*
Hey guys, since i was a bit bored and got some inspiration, i decided to make gKeys!
It is just like zcmd/gDialog, a shortcut with a easyer way of using player hotkeys!
*Callbacks*
pawn Код:
KEYHANDLER:key(playerid,type)
{
return 1;
}
Information | |
KEYHANDLER: | Will define the callback for the given key |
key | Insert your key here (without KEY_ in front of it! e.x. KEYHANDLER:SPRINT) |
playerid | the playerid pressing the key |
type | 0 = holding, 1 = pressed, 2 = released (please note that pressed will also be called when the player is holding a key!) |
*Example usage*
pawn Код:
//Example filterscript showing how to create a repair key with gKeys (numpad +)
#include <a_samp>
#include <gKeys>
KEYHANDLER:SUBMISSION(playerid,type)
{
if(type == 2) //if the key is released
{
RepairVehicle(GetPlayerVehicleID(playerid));
GameTextForPlayer(playerid,"~y~Your ~g~vehicle ~y~has been ~r~repaired ~y~!",3000,4);
}
return 1;
}
*Download*
http://pastebin.com/DQYR9xbs
Don't forget to also check http://www.gamer93.net/ to donate and/or see more of my work!
http://pastebin.com/DQYR9xbs
Don't forget to also check http://www.gamer93.net/ to donate and/or see more of my work!