Jump to content

[help]team lua


JasperRieken

Recommended Posts

 function checkIfTeamRight() 
    local team = --check my message at bottom 
    if (team and getTeamName(source) == "Xuju Crew") then 
       cancelEvent() 
    end 
end 
addEventHandler("onClientPlayerDamage", getLocalPlayer(), checkIfTeamRight) 
  

Atleast have a real attempt before asking for help...

--check my message at bottom Is suppost be

local team = getPlayerTeam(source) but for some reason when sumbitting this message this happens...

local team = getPlayerTeam" class="kw2">getPlayerTeam (source)

Link to comment

i got this so far but doesn't work

function skinStaff() 
 if getElementType(source) == "player" then -- check if a player element hit the marker 
local team = getPlayerTeam(source) --Getting player's team 
if team and getTeamName(team) == "Xuju Crew" then -- if player is in team and team name is "Xuju Crew" 
setElementModel(source,217) 
end 
end 
end 
addEventHandler("onTeamJoin",skinStaff) 

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