SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 29/07/2015, 08:49 PM   #1
sirvanec
Big Clucker
 
Join Date: Nov 2014
Posts: 117
Reputation: 0
Default block special command

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
sirvanec is offline   Reply With Quote
Old 30/07/2015, 01:24 AM   #2
sirvanec
Big Clucker
 
Join Date: Nov 2014
Posts: 117
Reputation: 0
Default Re: block special command

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;
}
sirvanec is offline   Reply With Quote
Old 30/07/2015, 01:33 AM   #3
Abagail
High-roller
 
Join Date: Dec 2013
Location: GetPlayerPos(playerid, pos); Scripter/Mapper.
Posts: 3,140
Reputation: 445
Default Re: block special command

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.
Abagail is offline   Reply With Quote
Old 30/07/2015, 11:21 AM   #4
sirvanec
Big Clucker
 
Join Date: Nov 2014
Posts: 117
Reputation: 0
Default Re: block special command

It's not working..
sirvanec is offline   Reply With Quote
Old 30/07/2015, 05:51 PM   #5
sirvanec
Big Clucker
 
Join Date: Nov 2014
Posts: 117
Reputation: 0
Default Re: block special command

anyone else?
sirvanec is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Block Rog Scripting Help 8 08/09/2018 01:38 AM
/block command Configuration Scripting Help 1 22/12/2013 12:14 PM
Block command(s) Ananisiki Scripting Help 4 14/03/2013 10:24 PM
Block the command if... ArTisT Help Archive 3 28/04/2010 08:10 PM
Need /block Command micki501 Help Archive 6 08/02/2009 11:18 AM


All times are GMT. The time now is 09:40 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.