Jump to content

Help!


DRW

Recommended Posts

Posted
teamplayers = createTeam (Jugadores, 255,255,255) 
  
function jugadores (thePlayer) 
if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) then 
if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alianza")) then 
setPlayerTeam (thePlayer, Jugadores) 
end 
end) 
  
  
addEventHandler ( "onResourceStart", getRootElement(), jugadores ) 

What did I do wrong?

My idea was to make a team for players that are not in Alianza nor Anarquia ACL groups, but it's not working.

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
teamplayer = createTeam(jugadores, 255, 255, 255) 
  
function jugadores(thePlayer) 
     local account = getPlayerAccount(thePlayer) 
     local accountName = getAccountName(account) 
     if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
        setPlayerTeam(thePlayer, teamplayer) 
    end 
end 
addEventHandler("onResourceStart", root, jugadores) 

 

 

Posted
teamplayer = createTeam(jugadores, 255, 255, 255) 
  
function jugadores(thePlayer) 
     local account = getPlayerAccount(thePlayer) 
     local accountName = getAccountName(account) 
     if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
        setPlayerTeam(thePlayer, teamplayer) 
    end 
end 
addEventHandler("onResourceStart", root, jugadores) 

Still not working

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
Remove this ")"

7fb14e3d96.png

Not working

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
teamplayer = createTeam(jugadores, 255, 255, 255) 
  
function jugadores(thePlayer) 
     if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) or not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alinaza")) then 
        setPlayerTeam(source, teamplayer) 
    end 
end 
addEventHandler("onResourceStart", root, jugadores) 

 

 

Posted

Still not working, for now, I have made this

teamplayer = createTeam("Jugadores", 255, 255, 255) 
  
function jugadores(thePlayer) 
     if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) or not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alianza")) then 
        setPlayerTeam(source, teamplayer) 
    end 
end 
addEventHandler ( "onPlayerJoin", getRootElement(), jugadores) 

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
teamplayer = createTeam(jugadores, 255, 255, 255) 
  
function jugadores(thePlayer) 
     if not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Anarquia")) or not isObjectInACLGroup("user."..getAccountName(getPlayerAccount(thePlayer)), aclGetGroup("Alianza")) then 
         setPlayerTeam(thePlayer, teamplayer) 
    end 
end 
addEventHandler("onPlayerJoin", root, jugadores) 

 

 

Posted

-- Client side

addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    triggerServerEvent( "clientReady", resourceRoot ) 
end 
) 

teamplayer = createTeam("Jugadores", 255, 255, 255) 
  
  
addEvent("clientReady", true ) 
addEventHandler("clientReady",resourceRoot, 
function() 
     local account = getPlayerAccount(client) 
     local accountName = getAccountName(account) 
     if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
        setPlayerTeam(client, teamplayer) 
    end 
end 
) 

Do not yield your back to your enemy, might feel something strange in your ass.

Two things are infinite the universe and human stupidity and i'm not sure about the universe.

UF: IsTextInGridList | GetGridListRowIndexFromText | Table.removeValue | removeHex | dxDrawTriangle

Skype: SaSuki102 | About Me | Youtube channel | Lua Tips & Tricks | Lua Strings | Lua Tables | Lua Operators

Posted
-- Client side
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    triggerServerEvent( "clientReady", resourceRoot ) 
end 
) 

teamplayer = createTeam("Jugadores", 255, 255, 255) 
  
  
addEvent("clientReady", true ) 
addEventHandler("clientReady",resourceRoot, 
function() 
     local account = getPlayerAccount(client) 
     local accountName = getAccountName(account) 
     if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
        setPlayerTeam(client, teamplayer) 
    end 
end 
) 

Still not working

tJ5zeFm.gif

Proud owner and developer of ZNEXT: Aftermath.

Enter a post-apocalyptic San Andreas and fight over 30 types of enemies and bosses with varying difficulties and skills, improve and customize your character by leveling up, completing challenges and a solid lootbox system with no Pay-to-Win mechanics that will break your experience.

Meet new characters, creatures and weapon metas, experience an innovative combo-based melee system, or join our solid PvP modes to show other survivors who’s boss. 

Español, Pусский, Türk, عربى, Polski, Português

IP: mtasa://104.36.110.227:22003 - Discord: https://discord.gg/CxMxjvC5pB

Posted
-- Client side
addEventHandler("onClientResourceStart",resourceRoot, 
function() 
    triggerServerEvent( "clientReady", resourceRoot ) 
end 
) 

teamplayer = createTeam("Jugadores", 255, 255, 255) 
  
  
addEvent("clientReady", true ) 
addEventHandler("clientReady",resourceRoot, 
function() 
     local account = getPlayerAccount(client) 
     local accountName = getAccountName(account) 
     if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
        setPlayerTeam(client, teamplayer) 
    end 
end 
) 

Still not working

Not work because you'll never did ACL groups named Anarquia and Alianza, should be created in ACL.

EDIT: your code in itself works.

Inactivo.

Posted

Guys c'mon, really? Your helping is going bad way.

Probably, resource will start earlier than player will log in, so in this case we'll need to use onPlayerLogin s-side event.

teamplayer = createTeam("Jugadores", 255, 255, 255) 
  
addEventHandler("onPlayerLogin", root, 
    function ( _, account ) 
        if isGuestAccount(account) then return end 
        local accountName = getAccountName(account) 
        if not isObjectInACLGroup("user."..accountName, aclGetGroup("Anarguia")) or not isObjectInACLGroup("user."..accountName, aclGetGroup("Alianza")) then 
            setPlayerTeam(source, teamplayer) 
        end 
    end 
) 

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