Originally Posted by
IzNoGoD
To make it fully compatible with code written for cod2 libcod, it should return the args as a bigger array, for example:
I turns out that fixChatArgs fixes this issue.
PHP Code:
CodeCallback_PlayerCommand(args)
{
args = fixChatArgs(args);
output = "";
for (i=0; i<args.size; i++)
output += args[i] + ", ";
printf("PLAYER COMMAND! message: " + output + "\n");
if(isPlayer(self))
{
printf("isPlayer self\n");
printf("Player: " + self.name + "\n");
}
else
printf("!isPlayer self\n");
self iprintlnbold("you wrote: " + output);
self ClientCommand();
}
CoD4 1.7: http://znation.nl/libcod/libcod4_1_7.so
CoD4 1.7 (query-limit-test): http://znation.nl/libcod/libcod4_1_7_l.so