Sasu Posted February 20, 2013 Posted February 20, 2013 Hi all! I have a problem with exports. function createTeamsOnStart () teamswat = createTeam ( "SWAT", 30, 0, 255 ) end addEventHandler("onResourceStart", resourceRoot, createTeamsOnStart) function iraswat ( gangName, player, command ) local gang = exports [ "gang_system" ]:getPlayersByGang ( gangName ) if ( gang == "SWAT" ) then setPlayerTeam ( player, teamswat ) setPlayerSkin(player, 285) giveWeapon ( player, 3 ) local allowedGroups = {"SWAT"} setElementData( player, "Occupation", "SWAT", true ) exports["Evo-notificaciones"]:showBox ( player, "info"," "..getPlayerName(player).." Bienvenido Ala SWAT." ) end end addCommandHandler ( "swat", iraswat ) I am using gang_system by @Solidsnake14 but when I put /swat command Its doesnt work. Can you help me? Thanks very much.
Castillo Posted February 20, 2013 Posted February 20, 2013 "getPlayersByGang" returns a table with players online from that gang, you must use "getPlayerGang" instead, also remove "gangName" from function name.
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