pressing buttons
#1

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 ?
Reply
#2

what function i should use ?
Reply
#3

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
Reply
#4

You can only detect the keys listed here:

Link

Edit: Too late lol
Reply
#5

oh, so how than I will catch the cheater?
Reply
#6

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.
Reply
#7

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...
Reply
#8

http://forum.sa-mp.com/showthread.ph...ght=anti-cheat
Reply
#9

Quote:
Originally Posted by Infamous
Посмотреть сообщение
i can't use this, this is bad script
Reply
#10

This is the best anticheat for me
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)