pressing buttons - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: pressing buttons (
/showthread.php?tid=209813)
pressing buttons -
Dainyzxz - 11.01.2011
hey all, i'm searching code to kick cheater from server by pressing button
if player press button "R", "Insert" or "F12" he will be kicked at the moment
how i can do this ?
Re: pressing buttons -
Dainyzxz - 11.01.2011
what function i should use ?
Re: pressing buttons -
XoX - 11.01.2011
I think it won't work without getting the ID of the cheater.
Here's a list of the supported keys:
https://sampwiki.blast.hk/wiki/GetPlayerKeys
Re: pressing buttons -
Infamous - 11.01.2011
You can only detect the keys listed here:
Link
Edit: Too late lol
Re: pressing buttons -
Dainyzxz - 11.01.2011
oh, so how than I will catch the cheater?
Re: pressing buttons -
Scenario - 11.01.2011
Quote:
Originally Posted by Dainyzxz
oh, so how than I will catch the cheater?
|
You should first learn the basics of administrating the server as you obviously have no freaking idea how anything works. Your basic commands are /kick, /ban, /freeze, /mute and of course /slap. You should learn how to use those commands, before even beginning to create your own server.
Re: pressing buttons -
saiberfun - 11.01.2011
Quote:
Originally Posted by XoX
I think it won't work without getting the ID of the cheater
|
why wouldn't it when a player does press a button you can check if he does so with
pawn Код:
OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if (newkeys & KEY_FIRE)
{
}
}
but he'd need the keyid of R INSERT and F12
which he could get with(correct me if it's wrong didn't use pawn in a long time^^):
pawn Код:
OnPlayerKeyStateChange(playerid,newkeys,oldkeys)
{
if(newkeys != 0)
{
new msg[10];
format(msg, 10, "%i", newkeys);
SendClientMessage(playerid, yourcolor,msg);
}
}
I'm not sure if these even exist...
Re: pressing buttons -
Infamous - 11.01.2011
http://forum.sa-mp.com/showthread.ph...ght=anti-cheat
Re: pressing buttons -
Dainyzxz - 11.01.2011
Quote:
Originally Posted by Infamous
|
i can't use this, this is bad script
Re: pressing buttons -
XoX - 11.01.2011
This is the best anticheat for me