DonPro Posted July 31, 2014 Share Posted July 31, 2014 hello everyone. ehm i want an ACL spawn and i dont know how to make it. i tryed to make some codes on it but didnt work, the spawn is not a .LUA but a .MAP but i will put it as .LUA here to show u. "PST" friendlyfire="false"password="PST321"> "PST security will make sure that our land are safe." /> "0" green="255" blue="255" /> "PST Guard" id="165" > "1496.19" y="725.12" z="10.82" rot="180.49" /> "PST Security Guard" id="166" > "1496.19" y="725.12" z="10.82" rot="180.49" /> "3" ammo="3" /> "41" ammo="500" /> "23" ammo="120" /> "45" ammo="450" /> "31" ammo="500" /> "43" ammo="450" /> "245" y="-1224" z="90" /> "245" y="-1224" z="90" /> Link to comment
PauloCascus Posted August 1, 2014 Share Posted August 1, 2014 hello everyone. ehm i want an ACL spawn and i dont know how to make it. i tryed to make some codes on it but didnt work, the spawn is not a .LUA but a .MAP but i will put it as .LUA here to show u. "PST" friendlyfire="false"password="PST321"> "PST security will make sure that our land are safe." /> "0" green="255" blue="255" /> "PST Guard" id="165" > "1496.19" y="725.12" z="10.82" rot="180.49" /> "PST Security Guard" id="166" > "1496.19" y="725.12" z="10.82" rot="180.49" /> "3" ammo="3" /> "41" ammo="500" /> "23" ammo="120" /> "45" ammo="450" /> "31" ammo="500" /> "43" ammo="450" /> "245" y="-1224" z="90" /> "245" y="-1224" z="90" /> add the group into the xml group="Admin" and then add into lua server side Additional option to get player ACL group like local xml = xmlLoadFile ("spawn.xml") local class = xmlFindChild(xml,"class",0) local color = xmlFindChild(class,"color",0) local skin = xmlFindChild(class,"skin",0) local spawn = xmlFindChild(class,"spawnpoint",0) local r = xmlNodeGetAttribute(color,"red") local g = xmlNodeGetAttribute(color,"green") local b = xmlNodeGetAttribute(color,"blue") local skinid = xmlNodeGetAttribute(skin,"id") local x = xmlNodeGetAttribute(spawn,"x") local y = xmlNodeGetAttribute(spawn,"y") local z = xmlNodeGetAttribute(spawn,"z") local rot = xmlNodeGetAttribute(spawn,"rot") local acl = xmlNodeGetAttribute(xml, "group") local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) ---------- --and then you need to add this into the spawn script ------- if isObjectInACLGroup ("user."..accName, aclGetGroup ( "..tostring ( acl ).." ) ) then spawnPlayer(source, tonumber(x), tonumber(y), tonumber(z), tonumber(rot), tonumber(skinid)) setPlayerNametagColor(source, tonumber(r), tonumber(g), tonumber(b) end And i think you need to use GUI Panel for this spawn Link to comment
Anubhav Posted August 1, 2014 Share Posted August 1, 2014 local xml = xmlLoadFile ("spawn.xml") local class = xmlFindChild(xml,"class",0) local color = xmlFindChild(class,"color",0) local skin = xmlFindChild(class,"skin",0) local spawn = xmlFindChild(class,"spawnpoint",0) local r = xmlNodeGetAttribute(color,"red") local g = xmlNodeGetAttribute(color,"green") local b = xmlNodeGetAttribute(color,"blue") local skinid = xmlNodeGetAttribute(skin,"id") local x = xmlNodeGetAttribute(spawn,"x") local y = xmlNodeGetAttribute(spawn,"y") local z = xmlNodeGetAttribute(spawn,"z") local rot = xmlNodeGetAttribute(spawn,"rot") local acl = xmlNodeGetAttribute(xml, "group") ---------- --and then you need to add this into the spawn script ------- function setNameTag(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( tostring ( acl ) ) ) then spawnPlayer(thePlayer , tonumber(x), tonumber(y), tonumber(z), tonumber(rot), tonumber(skinid)) setPlayerNametagColor(thePlayer , tonumber(r), tonumber(g), tonumber(b) end end Mistakes.. Link to comment
DonPro Posted August 1, 2014 Author Share Posted August 1, 2014 local xml = xmlLoadFile ("spawn.xml") local class = xmlFindChild(xml,"class",0) local color = xmlFindChild(class,"color",0) local skin = xmlFindChild(class,"skin",0) local spawn = xmlFindChild(class,"spawnpoint",0) local r = xmlNodeGetAttribute(color,"red") local g = xmlNodeGetAttribute(color,"green") local b = xmlNodeGetAttribute(color,"blue") local skinid = xmlNodeGetAttribute(skin,"id") local x = xmlNodeGetAttribute(spawn,"x") local y = xmlNodeGetAttribute(spawn,"y") local z = xmlNodeGetAttribute(spawn,"z") local rot = xmlNodeGetAttribute(spawn,"rot") local acl = xmlNodeGetAttribute(xml, "group") ---------- --and then you need to add this into the spawn script ------- function setNameTag(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( tostring ( acl ) ) ) then spawnPlayer(thePlayer , tonumber(x), tonumber(y), tonumber(z), tonumber(rot), tonumber(skinid)) setPlayerNametagColor(thePlayer , tonumber(r), tonumber(g), tonumber(b) end end Mistakes.. you mean this wont work? Link to comment
PauloCascus Posted August 2, 2014 Share Posted August 2, 2014 local xml = xmlLoadFile ("spawn.xml") local class = xmlFindChild(xml,"class",0) local color = xmlFindChild(class,"color",0) local skin = xmlFindChild(class,"skin",0) local spawn = xmlFindChild(class,"spawnpoint",0) local r = xmlNodeGetAttribute(color,"red") local g = xmlNodeGetAttribute(color,"green") local b = xmlNodeGetAttribute(color,"blue") local skinid = xmlNodeGetAttribute(skin,"id") local x = xmlNodeGetAttribute(spawn,"x") local y = xmlNodeGetAttribute(spawn,"y") local z = xmlNodeGetAttribute(spawn,"z") local rot = xmlNodeGetAttribute(spawn,"rot") local acl = xmlNodeGetAttribute(xml, "group") ---------- --and then you need to add this into the spawn script ------- function setNameTag(thePlayer) local accName = getAccountName ( getPlayerAccount ( thePlayer ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( tostring ( acl ) ) ) then spawnPlayer(thePlayer , tonumber(x), tonumber(y), tonumber(z), tonumber(rot), tonumber(skinid)) setPlayerNametagColor(thePlayer , tonumber(r), tonumber(g), tonumber(b) end end Mistakes.. you mean this wont work? i know that there are mistakes, couze im wrote it like example how to work with xml and what he need to use his xml file i have gave him example and then he need to think how to use it I'm not lua teacher Link to comment
Anubhav Posted August 2, 2014 Share Posted August 2, 2014 I meant his one had mistakes. @ Paulo, ok Link to comment
DonPro Posted August 2, 2014 Author Share Posted August 2, 2014 I meant his one had mistakes.@ Paulo, ok okey. i realy wanna learn how to script but im not that good in english and its hard to get started and look at Wiki when i dont understand anything about it you know. thats why im asking so much. im just making moving gates and mapping thats all but i wanna make an server to ^^ hehe 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