Question about a /fakeban command - 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)
+--- Thread: Question about a /fakeban command (
/showthread.php?tid=494598)
Question about a /fakeban command -
K9IsGodly - 14.02.2014
I'm making a /fakeban command, where you type /fakeban and then it'll make it look like they got banned to other players.
Код:
if(strcmp("/fakeban", cmdtext, true) == 0 )
{
new
strs[100],
xname[24],
pname[24],
reason[100];
format(strs,sizeof(strs),"{AA3333}AdmCmd{FFFF00}: %s was banned by %s, reason %s",pname, xname, reason);
SendClientMessageToAll(playerid, strs);
return 1;
}
I don't get how I could make a way to input the reason. Can anyone offer me some help? I may have wrote this entirely wrong from the get-go, but I don't know. Thanks in advance.
Re: Question about a /fakeban command -
Flake. - 14.02.2014
Just copy your ban command and remove
or
Re: Question about a /fakeban command -
K9IsGodly - 14.02.2014
Quote:
Originally Posted by (*|Flake|*)
Just copy your ban command and remove or
|
Oh yeah I suppose that would work. Thanks haha!
Re: Question about a /fakeban command -
Yashas - 14.02.2014
Get sscanf or use strtok.
Quote:
new idx;
new cmd[32];
cmd = strtok(cmd);
//Here comes ur strcmp but with cmd as the text variable
//in your fakeban command adding this will give you the reason
reason = strtok(text);
|