Understanding Key Functions! - 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: Understanding Key Functions! (
/showthread.php?tid=466819)
Understanding Key Functions! -
Champ - 29.09.2013
I want to know, Is it possible when players press any press ( for example: Aim Key ), then the another key automatically be pressed ( for example: Fire )
Like. When i hold aim in my server. It automatically fire without pressing any key.
I hope you understood.
Please give me little codding or explanation about it.
Thank You.
Re: Understanding Key Functions! -
Voxel - 29.09.2013
im 99% sure that this is not possible, the shooting can not be controlled by samp ..
Re: Understanding Key Functions! -
Lidor124 - 29.09.2013
I don't think its possible as i looked here:
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
Nothing about automatically keys... but if you wish wait for someone really expert on it.
Re: Understanding Key Functions! -
Champ - 29.09.2013
ok, but i want to know is there any function of crouching some one
Like
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/crouchme", true))
{
// Crouch Code.
return 1;
}
return 0;
}
Is there any function.
Re: Understanding Key Functions! -
Pottus - 29.09.2013
You can really only detect keys and at most play animations for a player there is no direct control over force pressing a players keys.
Re: Understanding Key Functions! -
Champ - 29.09.2013
but will this work?
pawn Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DUCK);
I tried but no change in player state :/
Re: Understanding Key Functions! -
EiresJason - 29.09.2013
No, as it is states on the wiki that:
Quote:
1 - SPECIAL_ACTION_DUCK * - Detect if the player is crouching.
(*) These Special Actions cannot be set.
|
Re: Understanding Key Functions! -
Champ - 29.09.2013
i thought anything can be done by scripting.
Can any expert make me this function? please