[QUESTION/PROBLEM] Can I make dcmd with space ? - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [QUESTION/PROBLEM] Can I make dcmd with space ? (
/showthread.php?tid=244782)
[QUESTION/PROBLEM] Can I make dcmd with space ? -
bijoyekuza - 28.03.2011
Hey scripters...
I tried to make this dcmd command
dcmd(accept ticket,13,cmdtext);
And It gave me 4 errors .....
Re: [QUESTION/PROBLEM] Can I make dcmd with space ? -
Sascha - 28.03.2011
strtok
edit: sec writing a code
edit2: actually strcmp
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(accept, 6, cmdtext);
return 0;
}
dcmd_accept(playerid, params[])
{
if(!strlen(params)) return 0;
if(!strcmp(params, "ticket", true))
{
//DO COMMAND TEXT HERE
}
else return 0;
}