iFoReX Posted July 2, 2012 Posted July 2, 2012 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 )
BorderLine Posted July 2, 2012 Posted July 2, 2012 Intente deducir de que trataba, pero no entendi. Cual es el proposito?
iFoReX Posted July 2, 2012 Author Posted July 2, 2012 para guardar los teams cuando salen, y comandos para unir players al team, y que cuando entre un player que no es del team al colcuboid muera
Simonboy Posted July 2, 2012 Posted July 2, 2012 men es muy complicado hay functions que lo hacen mas simple contactame y si quieres lo hablamos
Recommended Posts