Jump to content

sendClientCommand not sending data to server [solved]


AiweLelia

Recommended Posts

It is based on information from this post:

I have client comand by key:

local out = {}
out["p"] = p;
out["d"] = d;                       
sendClientCommand(char, "PD", "getPD", out); 

On server i have:

function OnClientCommand(module, command, player, args)    
    print("CLIENT COMMAND",command,args);    
    if not isServer() then
        print("not isServer()");
        return
    end;    
    
    if module ~= MOD_ID then         
        print("module ~= ",MOD_ID);
        return
    end;      
    
    if command == "getPD" then    t);

        --DoThing
        priint("done");
    end;
    
end

Events.OnClientCommand.Add(OnClientCommand);

The server is not one of the prints is not see, but standart server comands is here:

SERVER COMMAND    hoursElapsed    table 0x22973086

What wrong?

Edited by AiweLelia
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...