Jump to content

Problem setplayerteam !


HustraDev

Recommended Posts

Hi,

i have littel problem with this code i used to Set team for player but its not working,

  
addEvent("thekeem", true) 
addEventHandler("thekeem", root, 
function() 
local team = getTeamFromName("Iveco Drivers") 
    if team then 
 setplayerteam (source,team) 
    else 
local noteam = getTeamFromName ("Iveco Drivers") 
    if noteam then 
    cancelEvent 
    end 
    end 
end 
) 
  

Link to comment

thanks man i fix it the problem :

  
function setteam() 
local team = getTeamFromName("Iveco Drivers") 
    if team then 
 setplayerteam (source,team) 
    else 
local noteam = getTeamFromName ("Iveco Drivers") 
   if noteam then 
   cancelEvent 
   end 
    end 
end 
addEvent("thekeem", true) 
addEventHandler("thekeem", root,setteam) 

Link to comment
setplayerteam(source,team) 
setPlayerTeam(source,team) 

cancelEvent 
cancelEvent() 

Even so, cancelEvent has no function in this set-up.

function setteam() 
local team = getTeamFromName("Iveco Drivers") 
    if team then 
 setPlayerTeam (source,team) 
    else 
local noteam = getTeamFromName ("Iveco Drivers") 
   if noteam then 
   cancelEvent() 
   end 
    end 
end 
addEvent("thekeem", true) 
addEventHandler("thekeem", root,setteam) 

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