Command not working
#1

pawn Код:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys)) {
        if(groupVariables[playerVariables[playerid][pGroup]][gGroupType] == 2) {
            if(IsPlayerInRangeOfPoint(playerid, 4.5, 371.9613,166.6872,1008.3828)) switch(CHDoor) {
                case 0: {
                    MoveDynamicObject(CHDoor, 371.2587890625, 166.46171569824, 1007.3776245117, 3.5);
                    CHDoor = 1;
                }
                case 1: {
                    MoveDynamicObject(CHDoor, 371.25970458984, 166.59274291992, 1007.3776245117, 3.5);
                    CHDoor = 0;
                }
            }
        }
}
What's wrong with the code? Nothing happens when I press the SECONDARY ATTACK key...

It compiles with no errors / warnings.
Reply
#2

Change your
pawn Код:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
To
pawn Код:
if(newkeys == KEY_SECONDARY_ATTACK)
Reply
#3

There are other moving objects under
pawn Код:
if(IsKeyJustDown(KEY_SECONDARY_ATTACK, newkeys, oldkeys))
so I dont think that's the problem...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)