Jump to content

Where Problems Help me!!


-ffn-python

Recommended Posts

Hey Guys i'm fixed Sigmar lobby. but the new problem.

DRvQ01.png

addEvent("onServerSendS",true) 
addEventHandler("onServerSendS",root, 
function(commandstring) 
        local notReturned 
        local commandFunction,errorMsg = loadstring("return "..commandstring) 
        if errorMsg then 
            notReturned = true 
            commandFunction, errorMsg = loadstring(commandstring) 
        end 
        if errorMsg then 
            outputDebugString(errorMsg); 
            return 
        end 
        results = { pcall(commandFunction) } 
        if not results[1] then 
            return 
        end 
        if not notReturned then 
            local resultsString = "" 
            local first = true 
            for i = 2, #results do 
                if first then 
                    first = false 
                else 
                    resultsString = resultsString..", " 
                end 
                local resultType = type(results[i]) 
                if isElement(results[i]) then 
                    resultType = "element:"..getElementType(results[i]) 
                end 
                resultsString = resultsString..tostring(results[i]).." ["..resultType.."]" 
            end 
            outputDebugString(errorMsg); 
        elseif not errorMsg then 
        --loaded 
        end 
        removeEventHandler("onClientRender",root,drawWait); 
end) 

Link to comment
bool triggerClientEvent ( [table/element sendTo=getRootElement()], string name, element sourceElement, [arguments...] ) 

  • sendTo: The event will be sent to all players that are children of the specified element. By default this is the root element, and hence the event is sent to all players.
  • event: The name of the event to trigger server-side. You should register this event with addEvent and add at least one event handler using addEventHandler.
  • theElement: The element that is the source of the event.
  • arguments...: A list of arguments to trigger with the event.

Maybe the value in the arguments passed nil?

Link to comment
Okay. just Complete ?

Server-Side;

triggerClientEvent( client,"onServerSendS", client) 

...Like a this.

local clieeent = getRandomPlayer() -- for who 
local soooource = getRandomPlayer() -- what be source in this eventhandler on clientside 
local someString = "HelloWorld" -- argument to trigger with the event 
triggerClientEvent( clieeent,"onServerSendS", soooource, someString) 

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...