Author Topic: Players don't show up in my player list  (Read 859 times)

I have this code in a client side script

Code: [Select]
package Pack
{

    function secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame)
        {
            Parent::secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame);
        }
    

};


But when a player joins they don't show up in my player list and I get this error
NewPlayerListGui::UpdateTrust() - trust update received for non-existant client (7853505)

I don't think you can package secure client commands.

Oh.
How am I supposed to use it?

What exactly is your goal with this mod?

I don't think you can package secure client commands.

Sure you can. But this code does nothing, so either he did not post it entirely or the server is broken.

This is the full code:
Code: [Select]
package Pack
{

    function secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame)
        {
            CollectData(); // Get new player info
            Parent::secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame);
        }
    

};
It runs the code, but the new players don't show up in the player list
and to my client they dont exist.
I can still see chat messages by them, but they aren't in the NPL_List.

The problem is probably in your collectdata function then - the code above works fine.

I'm not sure what exactly was causing the problem, but when I changed it from this
Code: [Select]
package Pack
{

    function secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame)
        {
            CollectData(); // Get new player info
            Parent::secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame);
        }
   

};

To this:
Code: [Select]
package Pack
{

    function secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame)
        {
           
            Parent::secureClientCmd_ClientJoin(%clientName, %clientId, %clientblid, %score, %isAI, %isAdmin, %isSuperAdmin, %trust, %isInYourMinigame);

            schedule(100,0,CollectData); // Collect player info
        }
   

};

It works.

Thanks for the help!

That's because it hasn't added the info to the player list until you call the parent. If you remove that schedule it might work as well.

Also, collectData is a pretty ambiguous function name, you may want to use something else.