keybind - 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)
+--- Thread: keybind (
/showthread.php?tid=480163)
keybind -
gotwarzone - 09.12.2013
First of all i'm not referring to keybinding tools. I need a help for the script.
Coz i'm wondering if it's possible to keybind a SA-MP Keys.
For Example:
To Hire group (
G Key)
Quote:
KEY_CTRL_BACK** 262144 ~k~~GROUP_CONTROL_BWD~ ~k~~GROUP_CONTROL_BWD~ H H
|
To Horn/Hunk (
C Key)
Quote:
KEY_CROUCH 2 ~k~~PED_DUCK~ ~k~~VEHICLE_HORN~ C H / CAPSLOCK
|
Keys- SA-MP Wiki
I want when I press
C Key it will also Hire a Group and
G Key to do Horn/Hunk
Just like the sample here below:
Код:
COMMAND:kill(playerid,params[]);
{
SetPlayerHealth(playerid,0);
return 1;
}
Код:
COMMAND:suicide(playerid,params[]);
{
return cmd_kill(playerid,params[]);
}
Is it possible? If i'ts possible can you please show me how?
Thanks!
Re: keybind -
Loot - 09.12.2013
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_CROUCH) // C
{
// add the code to join a group - i.e
SetPlayerHealth(playerid,0);
}
return 1;
}
I'm not sure if horn at G possible since that's the only way to actually horn in a var.
Re: keybind -
gotwarzone - 10.12.2013
I hope they are something like this
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_CROUCH) // C
{
// add the code to join a group - i.e
SetPlayerHealth(playerid,0);
}
return 1;
}
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(newkeys & KEY_CROUCH)
{
return KEY_CTRL_BACK;
}
return 1;
}
lol