DRW Posted April 23, 2015 Posted April 23, 2015 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. 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
Dimos7 Posted April 23, 2015 Posted April 23, 2015 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)
Walid Posted April 23, 2015 Posted April 23, 2015 Remove this ")" 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
DRW Posted April 23, 2015 Author Posted April 23, 2015 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 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
DRW Posted April 23, 2015 Author Posted April 23, 2015 Remove this ")" Not working 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
Dimos7 Posted April 23, 2015 Posted April 23, 2015 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)
DRW Posted April 23, 2015 Author Posted April 23, 2015 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) 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
Walid Posted April 23, 2015 Posted April 23, 2015 you need to use onClientResourceStart() 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
Dimos7 Posted April 23, 2015 Posted April 23, 2015 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)
Walid Posted April 23, 2015 Posted April 23, 2015 -- 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
DRW Posted April 24, 2015 Author Posted April 24, 2015 -- 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 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
Enargy, Posted April 24, 2015 Posted April 24, 2015 -- 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.
WhoAmI Posted April 25, 2015 Posted April 25, 2015 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 )
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