Jump to content

triggerServerEvent


Et-win

Recommended Posts

local gSelected = guiGetSelectedTab(SW_S_tabpanel1) 
if (gSelected ~= false) and (gSelected ~= nil) then 
    lol = triggerServerEvent("CWS:onClientRequest:getSettings", getLocalPlayer(), gSelected) 
    outputChatBox(tostring(lol)) 

My question: Why can't I send the selected tab data to Server-side? (Goes from Client to Server and then back to Client for a special handler)

EDIT: When I use toJSON: "Couldn't convert userdata argument to JSON, elements not allowed for this function.". I guess this is my answer, userdata elements are not allowed, but why?

EDIT2: Fixed it on another way, but still want to know why it's blocked :roll:

Link to comment

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...