30.12.2014, 15:06
in notepad++
open replace, enable regular expressions
and search for: dcmd_(a-z,A-Z,0-9)*
and replace with: COMMAND:$1
that will "convert" everything looking like:
dcmd_abcd
to
COMMAND:abcd
and of course remove all the dcmd related stuff from OnPlayerCommandText
you also dont have to worry about unused params anymore, just remove it everywhere.
& you need this callback "OnPlayerCommandPerformed(playerid, cmdtext[], success)"
also, why not switch to YCMD ? check it out here
its far more advanced + slightly faster.
open replace, enable regular expressions
and search for: dcmd_(a-z,A-Z,0-9)*
and replace with: COMMAND:$1
that will "convert" everything looking like:
dcmd_abcd
to
COMMAND:abcd
and of course remove all the dcmd related stuff from OnPlayerCommandText
you also dont have to worry about unused params anymore, just remove it everywhere.
& you need this callback "OnPlayerCommandPerformed(playerid, cmdtext[], success)"
Quote:
Originally Posted by zeex
This one is called when someone sends a command. If you return 0 here, the command won't be performed.
|
its far more advanced + slightly faster.