Jump to content

setPlayerTeam


SkatCh

Recommended Posts

Posted

Hi,

please can anyone fix this for me :

i don't know maybe it's correct because i didn't test it .

_setPlayerTeam = setPlayerTeam 
function setPlayerTeam(player, team) 
    if (not isElement(player)) then return end 
    local oldTeam = getPlayerTeam(player) 
    if (oldTeam) then oldTeam = getTeamName(oldTeam) end 
    local team = getTeamFromName(team) 
    if (team) then 
        _setPlayerTeam(player, team) 
        triggerEvent("onPlayerChangeTeam", player, oldTeam, getTeamName(team)) 
    end 
end 

Posted

Mate what's _setPlayerTeam?...

Where's the name of the function?

where is the Eventhandler or CommandHabler? ofc it will not work due to these errors.

Too You should create a team, because you are using team as variable and it's not you should use the team that you create as variable, good luck!

Posted

ok bro i will try to fix it please i want to ask you how can i add To my Gui a GridList with 3 medic skins when you click one the skin of the player will be changed . ( i am sorry about my english)

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