bandi94 Posted December 17, 2011 Share Posted December 17, 2011 i had made an autoteam (you can find it on community) now i had a littel time and i decided do make an another more efficient whit invitations and in game team creating now i have 2 time if team's permanent saved on xml and temporary saved in tabel until are players in team after all player's left teh team the team get deleted now the temorary team work fine and here come's the problem where i am confused is the same code as on temporary team but it is not working xml <teams> <team name="asd" tag="%|DGT%|" color="#00ffff"></team> </teams> Loading of xml in tables working fine function LoadTeams () local xml= xmlLoadFile("teams.xml") local teamnodes=xmlNodeGetChildren(xml) for i,node in pairs(teamnodes) do local attributes = xmlNodeGetAttributes(node) Name[i]=attributes.name Tag[i]=attributes.tag Color[i]= attributes.color end xmlUnloadFile(xml) for i,v in pairs(Name) do outputChatBox(i.." : "..Name[i]) end end addEventHandler("onResourceStart",resourceRoot,LoadTeams) checking permanent team not working but here is the problem it outputChatBox all my checking :searching,found,createing team,seting team so are no error's in code but the team is not created and the team is not setted for player it is the same code as for temporary team's the singel ifference is that it's not chek the account and the team name tag color is saved in Tabel (in game whit a guiPanel) not in xml like permanent team's so what is wrong ? i know that driver2's autoteam its not working and he use same tehnick storage xml so its something whit createTeam and xml ? thx for helping function checkperm (player) setPlayerTeam(player,nil) if not isGuestAccount(getPlayerAccount(player)) then local team = getAccountData(getPlayerAccount(player),"team") outputChatBox("searching") for i,v in pairs(Tag) do if string.find(getPlayerName(player),v) then if team==v or team=="vezer"..v or team=="mod"..v then outputChatBox("found") if not getTeamFromName(Name[i]) then createTeam(Name[i],getColorFromString(Color[i])) outputChatBox("Creating team") end setPlayerTeam(player,getTeamFromName(Name[i])) outputChatBox("setting team ") end end end end Link to comment
12p Posted December 17, 2011 Share Posted December 17, 2011 viewtopic.php?f=91&t=37861 Link to comment
bandi94 Posted December 17, 2011 Author Share Posted December 17, 2011 ......... from your words I understand that you asking if i steal that script (i know if somebody see another script part they jump stealer.....) forgive me if you have asked that in another intentions or i misunderstood you EDIT: omg what a noob i am how i say i have 2 team groups and on nick change i caled booth check permanent and temprary and the permanent set my team and after it very fast the temoprary set it nil bk |DGT| clan dosen't exist on temporary team ... Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now