spoty Posted March 19, 2015 Share Posted March 19, 2015 Hello i have downloaded 50p's spawn selection thing but when i changed the catagory and skin's and acl checks i cannot see the catagory's and skin's can some one help me? here is the s_main.lua g_root = getRootElement( ); classGroups = { }; addEvent( "spawn_clientRequestSpawn", true ); addEventHandler( "spawn_clientRequestSpawn", g_root, function( categoryIndex, classIndex, skinIndex, password ) if skinIndex then local class = classGroups[ categoryIndex ].classes[ classIndex ]; if class.password then if not password or password == "" then triggerClientEvent( client, "spawn_requestPassword", root, class.name ); return; elseif password ~= class.password then outputChatBox( "The password you typed in is incorrect! Try again or cancel to choose different class.", client, 200, 50, 50 ); triggerClientEvent( client, "spawn_requestPassword", root, class.name ); return; end end local classACL = aclGetGroup( class.name ); local plrAccount = getPlayerAccount( client ); if ( classACL ) then if ( not isGuestAccount( plrAccount ) ) and ( not isObjectInACLGroup( "user." .. getAccountName( plrAccount ), classACL ) ) then outputChatBox( "You are not member of this team/gang. Choose different team!", client, 200, 50, 50 ); requestMenu( client ); return; elseif isGuestAccount( plrAccount ) then outputChatBox( "If you are member of \"" .. class.name .. "\" then please log in before you proceed.", client, 200, 50, 50 ); requestMenu( client ); return; end end local skin = class.skinMngr.skins[ skinIndex ]; local spawn = true; local spawned; --[[if not classGroups[ cetegoryIndex ].owner then -- if there is NO owner of the clan/gang spawn player spawn = true; else -- if there IS owner of the clan/gang then check if he's member of the clan/gang end]] if spawn then if not class.team then class.team = createTeam( class.name, class.color.red, class.color.green, class.color.blue ); end local plrTeam = getPlayerTeam( client ); if ( ( plrTeam ) and ( plrTeam ~= class.team ) and ( countPlayersInTeam( plrTeam ) == 1 ) ) then destroyElement( plrTeam ); end spawned = spawnPlayer( client, skin.spawnLoc.x, skin.spawnLoc.y, skin.spawnLoc.z, skin.spawnLoc.rot, skin.modelId, 0, 0, class.team ); end if spawned then setElementData( client, "team", class.name ) setElementData( client, "skin", skin.name ) fadeCamera( client, true ); setCameraTarget( client, client ); setTimer( setCameraTarget, 200, 1, client, client ); triggerClientEvent( client, "spawn_SpawnedSuccessfully", client ); --setPlayerMoney( client, 500 ); for _, weapon in ipairs( class.weaponMngr.weapons ) do giveWeapon( client, weapon.id, weapon.ammo, false ); end createBlipAttachedTo( client, 0, 2, class.color.red, class.color.green, class.color.blue ) else triggerClientEvent( client, "spawn_FailedToSpawn", client ); if countPlayersInTeam( class.team ) == 0 then destroyElement( class.team ); class.team = nil; end end end end ); addEvent( "spawn_receivePassword", true ); addEventHandler( "spawn_receivePassword", g_root, function( ) end ); addEventHandler( "onPlayerSpawn", g_root, function ( ) end ); addEventHandler( "onPlayerWasted", g_root, function( ) fadeCamera( source, false, 4 ); setTimer( requestMenu, 5000, 1, source ); deleteAllPlayerBlips( source ) end ); function requestMenu( player ) callClientFunc( player, "showSpawnMenu", true, true ); callClientFunc( player, "classSelected" ); end addCommandHandler( "kill", function( plr ) killPed( plr ); end ) function preloadClassesInfo( ) local groups = getElementsByType( "category" ); for _, group in ipairs( groups ) do table.insert( classGroups, Group:New( group ) ); end end addEventHandler( "onResourceStart", getResourceRootElement(), preloadClassesInfo ) function deleteAllPlayerBlips(player) local elements = getAttachedElements(player) if (elements) then for i, element in ipairs(elements) do if (getElementType(element) == "blip") then destroyElement(element) end end end print( "number of players in team: " .. tostring( countPlayersInTeam( getPlayerTeam( player ) ) ) ); end addEventHandler( "onPlayerQuit", g_root, function() deleteAllPlayerBlips(source) end ); ------------------------------------------------------------------------------------------ ------------------------------------------------------------------------------------------ function callClientFunc( player, funcName, ... ) if #{ ... } ~= 0 then triggerClientEvent( player, "_clientCallFunction", root, funcName, ... ) else triggerClientEvent( player, "_clientCallFunction", root, funcName ) end end addEvent( "_serverCallFunction", true ) addEventHandler( "_serverCallFunction", root, function( funcName, ... ) _G[ funcName ](...) end ) here is the spawn_locations.map "Normal Players" > "Everyone" friendlyfire="false" > "Welcome to MOGA Drift's" /> "255" green="102" blue="293" /> "Pizza Boy" id="155" > "-2029.2069091797" y="146.90687561035" z="28.8359375" /> "2065.88" y="2201.93" z="25.8" /> "2083.40" y="2224.30" z="12.0" /> "Groups" > "XDM" friendlyfire="false" > "This is only for XDM Members!!" /> "0" green="0" blue="205" /> "XDM Skin" id="296" > "1090.6784667969" y="2081.7590332031" z="10.8203125" /> "2213.82" y="2391.22" z="18.86" /> "2240.29" y="2422.73" z="13.44" /> "NFD" friendlyfire="false" > "This is only for the group NFD Members!."/> "0" green="0" blue="205" /> "NFD Skin" id="30" > "317.86889648438" y="-53.387432098389" z="1.578125" /> "-1436.06" y="2607.25" z="68.71" /> "-1389.87" y="2638.04" z="55.98" /> "MOGA" friendlyfire="false" > "Its for MOGA members only! [Try to fake MOGA and take the consuqense]"/> "0" green="0" blue="205" /> "MOGAHQ" id="29" > "1098.8828125" y="1439.1564941406" z="12.544322967529" /> "3" ammo="1" /> "22" ammo="133" /> "25" ammo="99" /> "-164.41" y="1001.96" z="32.14" /> "-217.15" y="979.71" z="19.50" /> "DE" friendlyfire="false" > "Military only!." /> "255" green="51" blue="61" /> "Military" id="287" > "1770.05" y="2081.23" z="11.0" rot="170.0" /> "42" ammo="5000" /> "22" ammo="133" /> "213.24743652344" y="1863.46875" z="13.140625" /> "1761.5" y="2080.32" z="11.0" /> "biker" friendlyfire="false" > "This is for Biker's only! /> 255" green="51" blue="61" /> " id="100" > 1544.7630615234" y="696.17767333984" z="13.409375190735" /> 1742.55" y="2056.22" z="18.96" /> 1761.5" y="2080.32" z="11.0" /> " > " friendlyfire="false" public="true" > get paid by killing rival gangs! Kills double in value up to 10 times for streaks!" /> 153" green="153" blue="153" /> " id="261" > 2537.8464355469" y="2808.09765625" z="10.8203125" /> 2" ammo="1" /> 22" ammo="133" /> 29" ammo="533" /> 2344.56" y="2707.19" z="25.82" /> 2372.10" y="2759.76" z="10.82" /> " friendlyfire="false" public="true" > get paid by killing rival gangs! Kills double in value up to 10 times for streaks!" /> 102" green="102" blue="102" /> " id="217" > 1789.0263671875" y="-1291.8963623047" z="13.610289573669" /> 1" ammo="1" /> 22" ammo="133" /> 30" ammo="333" /> 1576.93" y="786.02" z="25.74" /> 1591.02" y="752.95" z="10.82" /> Link to comment
spoty Posted March 19, 2015 Author Share Posted March 19, 2015 i just connat find what i did wrong its have 0 error's so i realy dont know please help Link to comment
TrapLord Studios™ Posted March 20, 2015 Share Posted March 20, 2015 Nothing on debug? Link to comment
Addlibs Posted March 20, 2015 Share Posted March 20, 2015 XML parsing failed, I guess. Look at line 78 text="This is for Biker's only! /> You forgot to end the string. It should look like this text="This is for Biker's only!" /> 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