PDA

View Full Version : block special command


sirvanec
29/07/2015, 08:49 PM
hi guys,

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

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

sirvanec
30/07/2015, 01:24 AM
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?

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

Abagail
30/07/2015, 01:33 AM
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.

sirvanec
30/07/2015, 11:21 AM
It's not working..

sirvanec
30/07/2015, 05:51 PM
anyone else?