Security Panel / Swipe card Help
#1

i ned help making a security panel / swipe card machine to open my fire department gate, its going to be set that only a medic skin/ fireman skin can open the gate, im new to the whole onplayerkeystatechange thing, please help.



heres the pastebin: http://pastebin.com/f4ac4ef01
Reply
#2

pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if((newkeys == KEY_SECONDARY_ATTACK)
    {
        if(GetPlayerSkin(playerid) == 280 || GetPlayerSkin(playerid) == 281 || GetPlayerSkin(playerid) == 284 || GetPlayerSkin(playerid) == 285 || GetPlayerSkin(playerid) == 286 || GetPlayerSkin(playerid) == 265 || GetPlayerSkin(playerid) == 266 || GetPlayerSkin(playerid) == 267 || GetPlayerSkin(playerid) == 71)
        {
            MoveObject(fdgate1, 1761.259399, -1691.880127, 18.295528);
            SendClientMessage(playerid, COLOR_RED, "You've opened the Gate.");
        }
    }
    return 1;
}
Is that what you're trying to do?
Reply
#3

Quote:
Originally Posted by Lazarus
pawn Код:
if((newkeys == KEY_SECONDARY_ATTACK)
pawn Код:
newkeys & KEY_SECONDARY_ATTACK
More efficient.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)