Jump to content

[help] SetPlayerTeam


Reggae

Recommended Posts

Posted

I want it so a player click a button it is set to the team "Trucker"

my client :

        addEventHandler('onClientGUIClick',GUIEditor.staticimage[2],setSkin,false)   

function setSkin ( ) 
    guiSetVisible (GUIEditor.staticimage[1], false) 
    showCursor (false) 
end 
addEvent("getJob", true) 
addEventHandler("getJob",root,setSkin) 

Serverside:

function createSAPDTeam () 
    SAPDteam = createTeam ("Caminhoneiro", 100, 149, 237) 
end 
addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) 
  
function joinSAPD(id) 
setPlayerTeam ( hitElement, Caminhoneiro ) 
end 
addEvent("getJob", true) 
addEventHandler("getJob",root,joinSAPD) 
  
Script Not Worked  Help !! 
  
  
  
  

Posted

Server:

function createSAPDTeam () 
    SAPDteam = createTeam ("Caminhoneiro", 100, 149, 237) 
end 
addEventHandler ("onResourceStart", resourceRoot, createSAPDTeam) 
  
function joinSAPD() 
setPlayerTeam ( source, SAPDteam ) 
end 
addEvent("getJob", true) 
addEventHandler("getJob",root,joinSAPD) 

Client:

function setSkin ( ) 
    guiSetVisible (GUIEditor.staticimage[1], false) 
    showCursor (false) 
    triggerServerEvent("getJob", localPlayer) 
end 

Please do not PM me with scripting related question nor support, use the forums instead.

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