Jump to content

triggerServerEvent


xXMADEXx

Recommended Posts

Posted

For some reason, when the player triggers the event, it will not set the team

client:

triggerServerEvent("rog:teams:setteam:community",localPlayer) 

server

-- Teams 
teamCommunity = createTeam ("Community", 255, 255, 0) 
  
--------- Functions --------- 
-- Community 
addEvent("rog:teams:setteam:community",true) 
addEventhandler("rog:teams:setteam:community",  
    function () 
        setPlayerTeam(source,teamCommunity) 
    end 
) 
  

Posted

Client :

triggerServerEvent("rog:teams:setteam:community",localPlayer) 

Server :

teamCommunity = createTeam ("Community", 255, 255, 0) 
  
addEvent("rog:teams:setteam:community",true) 
addEventHandler("rog:teams:setteam:community",  
    function () 
        setPlayerTeam(source,teamCommunity) 
    end 
) 

Posted
addEventHandler ( eventName, element attachedTo, handlerFunction ) 

have you looking to this !?

this is the second time you forget the element that you want to attach To and that will be root

hope you don't forget that again :D

Posted
Client :
triggerServerEvent("rog:teams:setteam:community",localPlayer) 

Server :

teamCommunity = createTeam ("Community", 255, 255, 0) 
  
addEvent("rog:teams:setteam:community",true) 
addEventHandler("rog:teams:setteam:community",  
    function () 
        setPlayerTeam(source,teamCommunity) 
    end 
) 

This didn't work :/
Posted
teamCommunity = createTeam ("Community", 255, 255, 0) 
  
addEvent("rog:teams:setteam:community",true) 
addEventHandler("rog:teams:setteam:community", root, 
    function ( ) 
        setPlayerTeam(source,teamCommunity) 
    end 
) 

Posted
teamCommunity = createTeam ("Community", 255, 255, 0) 
  
addEvent("rog:teams:setteam:community",true) 
addEventHandler("rog:teams:setteam:community", root, 
    function ( ) 
        setPlayerTeam(source,teamCommunity) 
    end 
) 

Thanks, lol go figure, always the 'root'

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