SA-MP Forums Archive
Anti-Joypad? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Anti-Joypad? (/showthread.php?tid=290025)



Anti-Joypad? - xLw - 13.10.2011

Can someone tell me how can i detect joypader , for example: if someone use Joypad controll from Settings , kick him from the server OR show to all "[Anti-Joypad]: X uses Joypad ! " . Can someone tell me how to do this? . I've tested JunkBuster 11 , witch have ANTI-Joypad , but i can't compile JunkBuster.pwn ... compilation error with "Double-O-Files_2" problem. If someone know how to do/solve this please tell me how , like for a begginer. Thank you.


Re: Anti-Joypad? - Ensconce - 14.10.2011

Here

****** is your friend and also read the rules about bumping.


Re: Anti-Joypad? - xLw - 14.10.2011

do you think you're smart? there is no joypad detector on ****** just a tutorial who don't works .


Re: Anti-Joypad? - HuSs3n - 14.10.2011

use junkbuster


Re: Anti-Joypad? - Retardedwolf - 14.10.2011

http://pastebin.com/swjzp8x3

@OP, ****** actually helps.


Re: Anti-Joypad? - xLw - 14.10.2011

Quote:
Originally Posted by Retardedwolf
Посмотреть сообщение
http://pastebin.com/swjzp8x3

@OP, ****** actually helps.
So this code where cand i put it?
Код:
OnPlayerUpdate(playerid) {
    new keys, ud, lr;
    GetPlayerKeys(playerid, keys, ud, lr);
    if((ud != 128 && ud != 0 && ud != -128) || (lr != 128 && lr != 0 && lr != -128)) 
        // using a joypad
    else 
        // not using a joypad
}



Re: Anti-Joypad? - OKStyle - 14.10.2011

It's working only if you really enter joystik to you pc... players from consoles can't goto samp-servers, and if you just select in gamememu joystik insted of keyboard + mouse - checking fail.


Re: Anti-Joypad? - xLw - 14.10.2011

@OKStyle , so what i understand is that Joypad control from GameMenu can't be detected?


Re: Anti-Joypad? - OKStyle - 14.10.2011

I'm try connect this (joy for PC) to PC and check tomorrow:



If you set Joy in gamemenu and move by keyboard - setting not detected.


Re: Anti-Joypad? - xLw - 14.10.2011

ok thank you