30.12.2011, 13:31
I've this code to check if player has joypad:
I tried to use joypad but the script doesn't freeze me and doesn't show that message,what's wrong?
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.
}
}