Keys not working?
#1

well, the KEY_LOOK_BEHIND code works like a charm, now the problem is when you get down to the KEY_LEFT and KEY_RIGHT code. It will not even change the skin. I'm stuck on the CJ skin, and if I press KEY_LEFT, my skin should be set to -1, and I should crash.. but it doesn't even do that. I need some help, any ideas onto why?

pawn Код:
if(PRESSED(KEY_LOOK_BEHIND))
    {
        if(IsPlayerInRangeOfPoint(playerid, 3, 181.3957,-89.5910,1002.0307) && Status[playerid] == 0)
        {
            SetPlayerPos(playerid, 182.6222,-91.7950,1002.0234);
            SetPlayerCameraPos(playerid, 179.4363,-91.7720,1002.0234);
            SetPlayerCameraLookAt(playerid, 182.6222,-91.7950,1002.0234);
            SetPlayerFacingAngle(playerid, 92.9159);
            TogglePlayerControllable(playerid, 0);
            TextDrawShowForPlayer(playerid, Textdraw24);
            TextDrawShowForPlayer(playerid, Textdraw25);
            Status[playerid] = 1;
        }
        else if(Status[playerid] == 1)
        {
            Status[playerid] = 0;
            TextDrawHideForPlayer(playerid, Textdraw24);
            TextDrawHideForPlayer(playerid, Textdraw25);
            TogglePlayerControllable(playerid, 1);
            SetPlayerPos(playerid, 178.5333,-88.4112,1002.0234);
            SetPlayerFacingAngle(playerid, 91.9525);
            SetCameraBehindPlayer(playerid);
        }
    }
    if(PRESSED(KEY_LEFT))
    {
        if(Status[playerid] == 1)
        {
            //if(IsInvalidSkin(i)) return 0;
            SetPlayerSkin(playerid, GetPlayerSkin(playerid)-1);
        }
    }
    if(PRESSED(KEY_RIGHT))
    {
        if(Status[playerid] == 1)
        {
            //if(IsInvalidSkin(i)) return 0;
            SetPlayerSkin(playerid, GetPlayerSkin(playerid)+1);
        }
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)