Jump to content

esta bien este codigo ?


iFoReX

Recommended Posts

no puedo probar este codigo me podrian decir si esta bien o esta mal ?

area = {} 
areaC = {} 
  
area[1] = createRadarArea() 
areaC[1] = createColCuboid() 
  
addEventHandler("onPlayerQuit", root, function() 
local theTeam = getPlayerTeam(source) 
local team = getTeamFromName(theTeam) 
if team then 
setAccountData(source,"team",team) 
end 
end 
) 
  
addEventHandler("onPlayerJoin",root,function() 
local team = getAccountData(source,"team") 
if team then 
setPlayerTeam(source,team) 
end 
end 
) 
  
addCommandHandler("createteam",function(theteam) 
if theteam then 
createTeam(theteam) 
end 
end 
) 
  
addCommandHandler("unir",function(player,team) 
if player and team then 
local theteam = getTeamFromName(team) 
setPlayerTeam(player,theteam) 
end 
end 
) 
  
addEventHandler("onColShapeHit",root,function(thePlayer,matchingDimension) 
if source == areaC[1] then 
if getElementType ( thePlayer ) == "player" then 
if ( getPlayerTeam ( thePlayer ) and getTeamName ( getPlayerTeam ( thePlayer ) ) ~= "theTeam" ) then 
killPed(thePlayer) 
end 
end 
end 
end 
) 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...