Understanding Key Functions!
#1

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.
Reply
#2

im 99% sure that this is not possible, the shooting can not be controlled by samp ..
Reply
#3

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.
Reply
#4

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.
Reply
#5

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.
Reply
#6

but will this work?

pawn Код:
SetPlayerSpecialAction(playerid,SPECIAL_ACTION_DUCK);
I tried but no change in player state :/
Reply
#7

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.

Reply
#8

i thought anything can be done by scripting.

Can any expert make me this function? please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)