gghvcffcv Posted March 28, 2014 Share Posted March 28, 2014 Hello i need you help for it. I want to rescrict This Job with your gang system createTeam ( "Official Squad", 0, 0, 255 ) function aceptarr () local theTeam = getTeamFromName ( "Official Squad" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) giveWeapon ( source, 34, 550 ) end end end addEvent( "onGreeting", true ) addEventHandler( "onGreeting", root, aceptarr ) i don't know how to do it I tried it but i don't know what arguments to use Link to comment
Castillo Posted March 28, 2014 Share Posted March 28, 2014 createTeam ( "Official Squad", 0, 0, 255 ) function aceptarr ( ) if ( getElementData ( source, "gang" ) == "GangNameHere" ) then -- Change this line. local theTeam = getTeamFromName ( "Official Squad" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) giveWeapon ( source, 34, 550 ) end end end addEvent ( "onGreeting", true ) addEventHandler ( "onGreeting", root, aceptarr ) Link to comment
gghvcffcv Posted March 28, 2014 Author Share Posted March 28, 2014 createTeam ( "Official Squad", 0, 0, 255 ) function aceptarr ( ) if ( getElementData ( source, "gang" ) == "GangNameHere" ) then -- Change this line. local theTeam = getTeamFromName ( "Official Squad" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) giveWeapon ( source, 34, 550 ) end end end addEvent ( "onGreeting", true ) addEventHandler ( "onGreeting", root, aceptarr ) Ok, Nice but i want other skin for Sub Leaders and leaders how could i restrict it? Link to comment
Castillo Posted March 28, 2014 Share Posted March 28, 2014 Use the exported functions "isGangSubLeader" and "getGangLeader". Link to comment
gghvcffcv Posted March 29, 2014 Author Share Posted March 29, 2014 createTeam ( "Official Squad", 0, 0, 255 ) function aceptarr ( ) if ( getElementData ( source, "gang" ) == "SWAT" ) then -- Change this line. if getGangLeader ("SWAT") then local theTeam = getTeamFromName ( "Official Squad" ) if ( theTeam ) then setPlayerTeam ( source, theTeam ) setPlayerNametagColor ( source, 0, 0, 255 ) setElementModel ( source, 285 ) giveWeapon ( source, 31, 550 ) giveWeapon ( source, 23, 550 ) giveWeapon ( source, 3, 550 ) giveWeapon ( source, 29, 550 ) giveWeapon ( source, 46, 550 ) giveWeapon ( source, 41, 5000 ) giveWeapon ( source, 34, 550 ) end end end end addEvent ( "onGreeting", true ) addEventHandler ( "onGreeting", root, aceptarr ) Not working Link to comment
Castillo Posted March 29, 2014 Share Posted March 29, 2014 You aren't using the exported function. Link to comment
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