Results 1 to 3 of 3

Thread: CodeCallback_PlayerCommand(args) not working

  1. #1
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts

    CodeCallback_PlayerCommand(args) not working

    Hi all,

    Im using Voron's libcod version on COD2 1.3. Everything is working (mysql etc), however the playercommand function isnt.
    It doesnt iprint the input and looks like the function is not called. Am I missing something or is it not suitable for 1.3?
    Code:
    CodeCallback_PlayerCommand(args) 
    { 
        if (isDefined(args[0])) 
        { 
            command = ""; 
            for (i = 0; i < args.size; i++) 
                command = command + args[i] + " "; 
    
            iprintln(command); 
        } 
    }

  2. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Youll need to full-restart your cod2 server as libcod looks for that function during startup. Adding it in later won't work, as a map_restart does NOT trigger libcod to look for said function again.

    Also, assuming that you're using a mod, make sure that 1) this code is inside maps/mp/gametypes/_callbacksetup.gsc and 2) that said file is not inside any of your modded .iwd files.
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  3. #3
    Brigadier General
    Join Date
    Dec 2012
    Posts
    1,012
    Thanks
    440
    Thanked 171 Times in 132 Posts
    Quote Originally Posted by IzNoGoD View Post
    Youll need to full-restart your cod2 server as libcod looks for that function during startup. Adding it in later won't work, as a map_restart does NOT trigger libcod to look for said function again.
    This was the problem. Thanks!

Posting Permissions

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