Jump to content

ACL "Police" group spawn player how would it be


Version

Recommended Posts

Hello, this message is to know how I could do to create a group of ACL scripts for gang members, for example "Mafia" I have designed, I found a script and I edited it more or less for myself, but when someone connects, it does not appear in Everyone the players for I want to see if you can create something similar and different and that is better thanks for reading I hope you help me because I have spent 2 days without sleep trying to investigate but the information I have found has not helped me at all because it has a bug
I don't know yet where this message is directed I'm new to this I hope everything is fine
Here I show you the bug of the script that I have modified, so I want someone to be able to create a new one for me because the one that I modified at the beginning worked fine and then when a player joins it appears in this way of course I did nothing wrong
pos: 0 0 0 script modified Everyone but when you register automatically login sends you to spawn
 
 
 
 
 
 
 
 
 
 
 
 
Link to comment

well here is the script I found and modified it because it was not so well they already have an idea but I want it to be another that someone designs it in another way to see if that bug stops appearing

well here is the script I found and modified it because it was not so well they already have an idea but I want it to be another that someone designs it in another way to see if I stop appearing that bug Pos: 0 0 0 You are at {0.00000, 0.00000, 0.00000}

takim1 = "Everyone" -- ACL Group Adını buraya giriniz
takim2 = "Moderator" -- ACL Group Adını buraya giriniz
takim3 = "SuperModerator" -- ACL Group Adını buraya giriniz
takim4 = "Admin" -- ACL Group Adını buraya giriniz

takim1skin = 285 -- Buraya Takim1 aclsinin doğduğunda verilicek olan skinin id sini yazınız.
takim2skin = 287 -- Buraya Takim2 aclsinin doğduğunda verilicek olan skinin id sini yazınız.
takim3skin = 286 -- Buraya Takim3 aclsinin doğduğunda verilicek olan skinin id sini yazınız.
takim4skin = 283 -- Buraya Takim4 aclsinin doğduğunda verilicek olan skinin id sini yazınız.

function oyuncuspawn(oyuncu)
if not isElement( oyuncu ) then return end
showChat( oyuncu, true )
local hesap = getPlayerAccount( oyuncu )
if hesap and not isGuestAccount( hesap ) then
if isObjectInACLGroup ( "user.".. getAccountName( hesap ), aclGetGroup ( takim1 ) ) then
spawnPlayer ( oyuncu, -2477.9606933594, 494.64392089844, 30.07054901123, 90, takim1skin )
elseif isObjectInACLGroup ( "user.".. getAccountName( hesap ), aclGetGroup ( takim2 ) ) then
spawnPlayer ( oyuncu, 588.4067402835, 875.51007080078, -42.497318267822 , 90, takim2skin)
elseif isObjectInACLGroup ( "user.".. getAccountName( hesap ), aclGetGroup ( takim3 ) ) then
spawnPlayer ( oyuncu, -1424.4116210938, 501.22912597556, 18.229438781738, 90, takim3skin)
elseif isObjectInACLGroup ( "user.".. getAccountName( hesap ), aclGetGroup ( takim4 ) ) then
spawnPlayer ( oyuncu, 2290.4890136719, 581.04016113281, 7.78125, 90, takim4skin)
end 
end
fadeCamera( oyuncu, true )
setCameraTarget( oyuncu, oyuncu )
end
     
addEventHandler( "onPlayerJoin", root,
function( )
oyuncuspawn( source )
end)
     
addEventHandler( "onPlayerWasted", root,
function( )
setTimer( oyuncuoyuncuspawn, 2500, 1, source )
end)

 

 

Link to comment
function oyuncuspawn(oyuncu)
    if not isElement(oyuncu) then return end
    showChat(oyuncu, true)
    local hesap = getPlayerAccount(oyuncu)
    if hesap and not isGuestAccount(hesap) then
        if isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim1)) then
            spawnPlayer(oyuncu, -2477.9606933594, 494.64392089844, 30.07054901123, 90, takim1skin)
        elseif isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim2)) then
            spawnPlayer(oyuncu, 588.4067402835, 875.51007080078, -42.497318267822 , 90, takim2skin)
        elseif isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim3)) then
            spawnPlayer(oyuncu, -1424.4116210938, 501.22912597556, 18.229438781738, 90, takim3skin)
        elseif isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim4)) then
            spawnPlayer(oyuncu, 2290.4890136719, 581.04016113281, 7.78125, 90, takim4skin)
        else
            --added if the player is not assigned to any group
            spawnPlayer(oyuncu, 1959.55, -1714.43, 10, 90, 0)
        end
    end
    fadeCamera(oyuncu, true)
    setCameraTarget(oyuncu, oyuncu)
end

addEventHandler("onPlayerJoin", root,
function()
    oyuncuspawn(source)
end)

addEventHandler("onPlayerWasted", root,
function()
    --fixed a typo arg1
    setTimer(oyuncuspawn, 2500, 1, source)
end)

I recommend you to create a table and loop over the groups that would be much easier to modify the groups

Link to comment
1 hour ago, FLUSHBICEPS said:
function oyuncuspawn(oyuncu)
    if not isElement(oyuncu) then return end
    showChat(oyuncu, true)
    local hesap = getPlayerAccount(oyuncu)
    if hesap and not isGuestAccount(hesap) then
        if isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim1)) then
            spawnPlayer(oyuncu, -2477.9606933594, 494.64392089844, 30.07054901123, 90, takim1skin)
        elseif isObjectInACLGroup("user."..getAccountName(hesap), aclGetGroup(takim2)) then
            spawnPlayer(oyuncu, 588.4067402835, 875.51007080078, -42.497318267822 , 90, takim2skin
             
             
        
                 
        
     






      

Le recomiendo que cree una tabla y recorra los grupos para que sea mucho más fácil modificar los grupos.

thanks but I edited it almost the same everyone moderator supermoderator mod and my question is if I could do something similar because it works but the problem is that I get a bug when modifying something
I mean if you can create one from scratch that is different from mine and that doesn't bugie when you change something.
 
 
 
 
 
1 minute ago, Version said:
thanks but I edited it almost the same everyone moderator supermoderator mod and my question is if I could do something similar because it works but the problem is that I get a bug when modifying something
I mean if you can create one from scratch that is different from mine and that doesn't bugie when you change something.
What a shame I am very new to this I don't understand much damn man
 
 
 
 

 

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