Jump to content

triggerServerEvent [HELP]


Sande

Recommended Posts

Hey, im try trigger something like this, but it says not working trigger or something can someone fix?

Server:

  
function ung() 
    local team = getTeamFromName ("Unemployed") 
    if (team) then 
    setPlayerTeam ( source, team ) 
    outputChatBox("Freeroam toiminnot kytketty pois käytöstä!, source, 0,255,0) 
    end 
end 
addEvent( "un", true ) 
addEventHandler( "un", source, ung) 
  
 

Client:

  
function eroa ( ) 
    local team = getPlayerTeam ( localPlayer ) 
    if getTeamName (team) == "Freeroam" then 
    if getElementData ( localPlayer, "godmodeEnabled") == true then 
    setElementData ( localPlayer, "godmodeEnabled", false ) 
    executeCommandHandler("godmode-kaynnista-tullessa191") 
    triggerServerEvent ( "un", localPlayer )  
          end 
     end 
end 
addCommandHandler("poistuFR", eroa) 
  
  

Link to comment

Server:

function ung() 
    local team = getTeamFromName ("Unemployed") 
    if (team) then 
    setPlayerTeam ( source, team ) 
    outputChatBox("Freeroam toiminnot kytketty pois käytöstä!", source, 0,255,0) 
   end 
end 
addEvent( "un", true ) 
addEventHandler( "un", root, ung) 

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