Results 1 to 9 of 9

Thread: [Extension] Player Command Control (includes CHAT-Control for Builtin-B3!)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #6
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    The "player spawn(origin, angle)"-function is crashing the server when used in CodeCallback_PlayerCommand(args).

    To prevent the Segmentation Fault, just write:

    PHP Code:
    CodeCallback_PlayerCommand(args)
    {
        
    waittillframeend;
        
    // all other code...
        // all other code...
        // all other code...

    or:


    PHP Code:
    CodeCallback_PlayerCommand(args)
    {
        
    wait 0.05;
        
    // all other code...
        // all other code...
        // all other code...

    Attention: Only call wait 0.05; or waittillframeend; when you really need to call the spawn-function! Because the arguments are saved in ONE global structure and when 2 players in a server write something near in the same time, the ClientCommand()-function is mixing up the data otherwise.
    timescale 0.01

  2. The Following User Says Thank You to kung foo man For This Useful Post:

    rkneraldo (8th July 2019)

Posting Permissions

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