[SOLVED]OnPlayerStateKeyChange Help Needed
#1

Ok, so this is what i have:
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
    {
            if(PlayerToPoint(2, playerid, 245.1057,71.9354,1003.6406) && IsACop(playerid))
            {
                ApplyAnimation(playerid,"HEIST9","Use_SwipeCard",4.1,0,1,0,0,0);
                SetTimer("GateClosedesk", 5000, 0);
                SendClientMessage(playerid, COLOR_YELLOW,"The LSPD Gate will AutoClose in 5 Seconds");
                MoveObject(lspdvault,246.3735,72.6083,1000.6406,10);
            }
        }
It compiles fine but when i got to use it IG nothing happends

Can someone please help?
Reply
#2

newkeys & KEY_WHATEVER
Reply
#3

Still doesn't work
Reply
#4

*Bump*
I really need this to work
Reply
#5

you are pressing the enter key or the f key aren't you?
Reply
#6

are you using
Код:
OnPlayerKeyStateChange
or
Код:
OnPlayerStateChange
because the title of this topic is 'OnPlayerStateChange Help Needed'
Reply
#7

Quote:
Originally Posted by °ғαιιοцт°
are you using
Код:
OnPlayerKeyStateChange
or
Код:
OnPlayerStateChange
because the title of this topic is 'OnPlayerStateChange Help Needed'
OnPlayerKeyStateChange

Title was a typo
Reply
#8

Quote:
Originally Posted by [DRuG
Smallo ]
you are pressing the enter key or the f key aren't you?
Yes i am
Reply
#9

give the lines above
Код:
if(newkeys == KEY_SECONDARY_ATTACK)
Reply
#10

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(!gPlayerUsingLoopingAnim[playerid]) return;
    //SendClientInt(playerid, RED, "ID: %d", newkeys);
    if(IsKeyJustDown(KEY_HANDBRAKE,newkeys,oldkeys))
        {
            StopLoopingAnim(playerid);
        TextDrawHideForPlayer(playerid,txtAnimHelper);
        animation[playerid] = 0;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)