Code don't work
#1

I've this code to check if player has joypad:

pawn Код:
new JoyPadders[MAX_PLAYERS];

OnPlayerUpdate(playerid) {
    if(JoyPadders[playerid] == 0) {
        new keys, ud, lr;
        GetPlayerKeys(playerid, keys, ud, lr);
        if((ud != 128 && ud != 0 && ud != -128) || (lr != 128 && lr != 0 && lr != -128))
        JoyPadders[playerid] = 1;
        SendClientMessage(playerid, COLOR_GREEN, "Joypad detected,freezed.");
        TogglePlayerControllable(playerid,0);
        else
       //nothing.
    }
}
I tried to use joypad but the script doesn't freeze me and doesn't show that message,what's wrong?
Reply


Messages In This Thread
Code don't work - by Face9000 - 30.12.2011, 13:31
Re: Code don't work - by wildcookie007 - 30.12.2011, 13:38
Re: Code don't work - by [ABK]Antonio - 30.12.2011, 13:47

Forum Jump:


Users browsing this thread: 2 Guest(s)