tony402 Posted May 9, 2014 Share Posted May 9, 2014 hi, i downloaded this Admin base from the mta sa community, i was wondering if anyone knows how to make a group in the ACL to spawn in that base. for example i have a group named V.I.P in the ACL, how will i make the V.I.P spawn in that base? Link to comment
Karuzo Posted May 9, 2014 Share Posted May 9, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName ( getPlayerAccount ( source ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "V.I.P" ) ) the spawnPlayer(source,x,y,z) end end ) Link to comment
tony402 Posted May 9, 2014 Author Share Posted May 9, 2014 it says ERROR: Loading script failed: adminbase-byshorty\server.lua:22: ')' expected (to close '(' at line 21) near 'if' Link to comment
Karuzo Posted May 9, 2014 Share Posted May 9, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "V.I.P" ) ) the spawnPlayer(source,x,y,z) end end ) Link to comment
Snow-Man Posted May 9, 2014 Share Posted May 9, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "V.I.P" ) ) then spawnPlayer(source,x,y,z) end end ) line 4 Then Link to comment
tony402 Posted May 9, 2014 Author Share Posted May 9, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName ( getPlayerAccount ( source ) ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "V.I.P" ) ) then spawnPlayer(source,x,y,z) end end ) line 4 Then Do i replace the x,y,z with the coordinates i want? Link to comment
tony402 Posted May 9, 2014 Author Share Posted May 9, 2014 Do i add that on server side or client side? Link to comment
tony402 Posted May 9, 2014 Author Share Posted May 9, 2014 i added it but the player still doesn't spawn there. Link to comment
tony402 Posted May 9, 2014 Author Share Posted May 9, 2014 Post the script and meta how do i attach the file i don't see an option? Link to comment
tony402 Posted May 16, 2014 Author Share Posted May 16, 2014 kk this is the server side --Elevator Function =D --Created by shorty16 function elevatorspawn() elevator = createObject(3115, 3197.5, -728.5, 0, 0, 0, 0) --spawning object end addEventHandler("onResourceStart", getResourceRootElement (getThisResource ()), elevatorspawn) function elevatorsystem() --Function to move the elevator A moveObject(elevator, 45000, 3197.5, -728.5, 104.4) end addCommandHandler("elevatorup",elevatorsystem) --you can edit the command function elevatorsystemB() --Function to move the elevator B moveObject(elevator, 45000, 3197.5, -728.5, 0) end addCommandHandler("elevatordown",elevatorsystemB) --you can edit the command addEventHandler("onPlayerLogin",root, function() local accName = getAccountName ( getPlayerAccount) ( source ) if isObjectInACLGroup ("user."..accName, aclGetGroup ( "V.I.P" ) ) then spawnPlayer(source,3227,-690,108) end end ) And this is the Meta Link to comment
johny46 Posted May 16, 2014 Share Posted May 16, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("V.I.P")) then spawnPlayer(source,3227,-690,108) end end ) Try this. If it still doesn't work, please provide the debugscript output. Link to comment
tony402 Posted May 20, 2014 Author Share Posted May 20, 2014 addEventHandler("onPlayerLogin",root, function() local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("V.I.P")) then spawnPlayer(source,3227,-690,108) end end ) Try this. If it still doesn't work, please provide the debugscript output. Kk will try later thanks Link to comment
tony402 Posted May 22, 2014 Author Share Posted May 22, 2014 it worked but how would i change this to Spawn rather then login? Link to comment
Moderators Citizen Posted May 23, 2014 Moderators Share Posted May 23, 2014 it worked but how would i change this to Spawn rather then login? What do you mean ? Link to comment
xeon17 Posted May 23, 2014 Share Posted May 23, 2014 Maybe he mean this addEventHandler("onPlayerWasted",root, function() local accName = getAccountName(getPlayerAccount(source)) if isObjectInACLGroup("user."..accName, aclGetGroup("V.I.P")) then spawnPlayer(source,3227,-690,108) end end ) 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