SERVER: Unknown Command (dcmd) - 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: SERVER: Unknown Command (dcmd) (
/showthread.php?tid=449068)
SERVER: Unknown Command (dcmd) -
martoivanov - 07.07.2013
In my gamemode script there are DCMD and ZCMD cmds. I did all i had to - dcmd(.....), return 0 at the end of OnPlayerCommandText. And stil not working

What can i do?
Thanks in advance!
Re: SERVER: Unknown Command (dcmd) -
Konstantinos - 07.07.2013
Do not use both of them. Use either DCMD or ZCMD.
Re: SERVER: Unknown Command (dcmd) -
dEcooR - 07.07.2013
yes its problem with "mixing" systems so use only once
Re: SERVER: Unknown Command (dcmd) -
kristo - 07.07.2013
ZCMD blocks the OnPlayerCommandText callback but you can use the dcmd(...) lines in the callbacks included with ZCMD:
Код:
OnPlayerCommandReceived(playerid, cmdtext[])
OnPlayerCommandPerformed(playerid, cmdtext[], success)
Re: SERVER: Unknown Command (dcmd) -
Konstantinos - 07.07.2013
There's not a reason to do it. Seriously, dcmd uses strcmp in a macro which makes it still slow and outdated. Switch to ZCMD for a better performance and sscanf instead of strtok (if you use it, I recommend you not to do it anymore).
Re: SERVER: Unknown Command (dcmd) -
JaKe Elite - 07.07.2013
Or you can use YCMD for more faster performance (if you're using more than 500 commands or more)
Re: SERVER: Unknown Command (dcmd) -
kristo - 07.07.2013
Quote:
Originally Posted by _Jake_
Or you can use YCMD for more faster performance (if you're using more than 500 commands or more)
|
Actually the difference is very tiny and can only be seen in the speed tests, not in a regular gamemode.