tony402 Posted May 9, 2014 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?
Karuzo Posted May 9, 2014 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 )
tony402 Posted May 9, 2014 Author Posted May 9, 2014 it says ERROR: Loading script failed: adminbase-byshorty\server.lua:22: ')' expected (to close '(' at line 21) near 'if'
Karuzo Posted May 9, 2014 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 )
Snow-Man Posted May 9, 2014 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
tony402 Posted May 9, 2014 Author 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?
tony402 Posted May 9, 2014 Author Posted May 9, 2014 i added it but the player still doesn't spawn there.
tony402 Posted May 9, 2014 Author Posted May 9, 2014 Post the script and meta how do i attach the file i don't see an option?
tony402 Posted May 16, 2014 Author 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
johny46 Posted May 16, 2014 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.
tony402 Posted May 20, 2014 Author 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
tony402 Posted May 22, 2014 Author Posted May 22, 2014 it worked but how would i change this to Spawn rather then login?
Moderators Citizen Posted May 23, 2014 Moderators Posted May 23, 2014 it worked but how would i change this to Spawn rather then login? What do you mean ?
xeon17 Posted May 23, 2014 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 )
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