block special command
#1

hi guys,

i have problem with bot attack. it have special command like !kill or something like this.. i added this under onplayertext:

Quote:

public OnPlayerText(playerid, text[])
{
if(strfind(text, "!kill", true) != -1)
{
Ban(playerid);
return false;
}

but they can write it with bot program and it's not ban them.. so how can i do that it ban them and command be return 0
Reply
#2

JuanStone, that will ban player but did that return 0 i mean player has been banned but command must be returned 0.. can i make it like this?

Quote:

if (!strcmp(text, "!kill", true)){
BanEx(playerid, "crasher");
return false;
}

Reply
#3

Yes. Note returning 0 simply stops the text from being by default send, if you're using a custom talking script(most gamemodes + especially roleplay ones do), you will need to take a look and configure it to work with your script specifically.
Reply
#4

It's not working..
Reply
#5

anyone else?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)