i want to make press "c" for teleport and ..
#10

Quote:
Originally Posted by maramizo
Посмотреть сообщение
pawn Код:
CMD:enter(playerid, params[])
{
    //code here
}

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys & KEY_CROUCH)
    {
        //the code from /enter goes here.
    }
    return 1;
}
pawn Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
    if(newkeys == KEY_CROUCH)
    {
        //the code from /enter goes here.
    }
    return 1;
}
You just put & instead of == :S
To be completely honest, I'm sure if that even makes a difference, but just in case.

EDIT: I'm not sure*
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)