Jump to content

[HELP] Spawn


Recommended Posts

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
  
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
  
  
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
 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
 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

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
  
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
  
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

Maybe he mean this :P

  
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...