Results 1 to 3 of 3

Thread: CoD4: !commands

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Global Mossaderator Mitch's Avatar
    Join Date
    Nov 2012
    Posts
    654
    Thanks
    204
    Thanked 450 Times in 305 Posts
    Quote Originally Posted by IzNoGoD View Post
    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=0i<args.sizei++) 
            
    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
    Last edited by Mitch; 28th October 2014 at 12:07.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •