TheIceman1 Posted April 9, 2013 Posted April 9, 2013 Why this dont set my team to "Off Duty"?No errors function endshift() if ( getAccountData ( getPlayerAccount(source), "offduty" ) == false ) then local team = getPlayerTeam ( source ) setAccountData ( getPlayerAccount ( source ), "offduty", true ) setAccountData ( getPlayerAccount ( source ), "teamoff", team ) setTimer( function(player) local team = getTeamFromName ( "Off Duty" ) setPlayerTeam ( player, getTeamFromName ( "Off Duty" ) ) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end ,1000,1, source) else local team = getAccountData ( getPlayerAccount ( source), "teamoff" ) setPlayerTeam ( source, team ) end end addEvent ( "endshift", true ) addEventHandler( "endshift", root, endshift ) Need paid scripter just pm me i will accept every job!
Max+ Posted April 9, 2013 Posted April 9, 2013 addEvent('endshit', true) addEventHandler('endshift', root, function ( player ) if (getAccountData( getPlayerAccount( player), 'offduty') == false ) then setAccountData ( getPlayerAccount ( player ), "offduty", true ) local team = getPlayerTeam(getTeamFromName('Off Duty')) setPlayerTeam(player, team) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end end ) - New , Kill System - New, GameMode Intro - Leve / Exp System - New nametag showing style - New , Hud For Players - Skin Selection from SA-MP - Money System / Buy Weapons - Drop Weapons - New, Flood System - New , Group Assign - Gun license For Weapons - Random Rule System For Money
TheIceman1 Posted April 9, 2013 Author Posted April 9, 2013 addEvent(':~', true) addEventHandler('endshift', root, function ( player ) if (getAccountData( getPlayerAccount( player), 'offduty') == false ) then setAccountData ( getPlayerAccount ( player ), "offduty", true ) local team = getPlayerTeam(getTeamFromName('Off Duty')) setPlayerTeam(player, team) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end end ) You dont understand what i want. Need paid scripter just pm me i will accept every job!
فاّرس Posted April 9, 2013 Posted April 9, 2013 what do you mean ? what is the problem ?? Sha67 سابقاً
TheIceman1 Posted April 9, 2013 Author Posted April 9, 2013 i want that when i click button then this should set my team to "Off duty",but this dont set my team to "Off Duty" Need paid scripter just pm me i will accept every job!
manve1 Posted April 10, 2013 Posted April 10, 2013 did you trigger it? Looking for tutorials or information? check out: www.simpleask.co.uk
TheIceman1 Posted April 10, 2013 Author Posted April 10, 2013 Yes Need paid scripter just pm me i will accept every job!
manve1 Posted April 10, 2013 Posted April 10, 2013 addEvent('endshift', true) addEventHandler('endshift', root, function ( player ) if (not getPlayerTeam(getTeamFromName('Off Duty')) then setAccountData ( getPlayerAccount ( player ), "offduty", true ) local team = getTeamFromName('Off Duty') setPlayerTeam(player, team) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end end ) Looking for tutorials or information? check out: www.simpleask.co.uk
فاّرس Posted April 10, 2013 Posted April 10, 2013 ok add resource.name in group admin addEvent('endshift', true) addEventHandler('endshift', root, function ( player ) if (not getPlayerTeam(getTeamFromName('Off Duty')) then setAccountData ( getPlayerAccount ( player ), "offduty", true ) local team = getTeamFromName('Off Duty') setPlayerTeam(player, team) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end end ) bool setPlayerTeam ( player thePlayer, team theTeam ) Sha67 سابقاً
manve1 Posted April 10, 2013 Posted April 10, 2013 yes, everything is fine? as in my code "player" returns player element and "team" returns the team with a name of "Off Duty" whereas in Max+ code "team" returns players team with a name of "Off Duty", but the player doesn't have a group that occupied him with a name of "Off Duty". Do you get what i mean? Looking for tutorials or information? check out: www.simpleask.co.uk
TheIceman1 Posted April 10, 2013 Author Posted April 10, 2013 addEvent('endshift', true) addEventHandler('endshift', root, function ( player ) if (not getPlayerTeam(getTeamFromName('Off Duty')) then setAccountData ( getPlayerAccount ( player ), "offduty", true ) local team = getTeamFromName('Off Duty') setPlayerTeam(player, team) local r, g, b = getTeamColor ( team ) setPlayerNametagColor ( player, r, g, b ) end end ) Working! Need paid scripter just pm me i will accept every job!
manve1 Posted April 10, 2013 Posted April 10, 2013 No problem. Looking for tutorials or information? check out: www.simpleask.co.uk
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