SoMoRay Posted May 1, 2013 Share Posted May 1, 2013 function( playerWhoUses ) if playerWhoUses == localPlayer then for theKey,thePlayer in ipairs(getElementsByType("player")) do if ( getPlayerWantedLevel ( playerWhoUses ) == 0 ) then WARRING : Bad argument @getPlayerWantedLevel Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 This code make no sense at all post you're whole code and it's server or client side? Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 This code make no sense at all post you're whole code and it's server or client side? server Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Post the whole script you're code make no sense at all. Link to comment
TAPL Posted May 1, 2013 Share Posted May 1, 2013 This code make no sense at all post you're whole code and it's server or client side? server if playerWhoUses == localPlayer then What does localPlayer do in server side? Link to comment
PaiN^ Posted May 1, 2013 Share Posted May 1, 2013 Show where you trigger that function so we can help you . Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 This code make no sense at all post you're whole code and it's server or client side? server if playerWhoUses == localPlayer then What does localPlayer do in server side? what wrong now Server Side ! addEvent("Setting",true) addEventHandler("Setting",root, function(playerWhoUses) giveWeapon ( playerWhoUses, 3, 1) setPlayerTeam ( playerWhoUses, Police ) end) Client side ! addEventHandler ( 'onClientGUIClick', GUIEditor.button[1], function( playerWhoUses ) if playerWhoUses == localPlayer then for theKey,thePlayer in ipairs(getElementsByType("player")) do if ( getPlayerWantedLevel ( playerWhoUses ) == 0 ) then setPlayerNametagText ( playerWhoUses, '[COP]' .. getPlayerName ( playerWhoUses ) ) setElementData ( playerWhoUses, 'job', 'police' ) setPedSkin ( playerWhoUses, 280 ) triggerServerEvent("Setting",playerWhoUses,getLocalPlayer()) outputChatBox ( '', playerWhoUses, 0, 0, 255, false ) outputChatBox ( '', playerWhoUses, 0, 0, 255, false ) outputChatBox ( '', playerWhoUses, 0, 0, 255, false ) else outputChatBox ( '', playerWhoUses, 0, 0, 255, false ) end end end end ) Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 Are you : https://forum.multitheftauto.com/memberlist.php?mode=viewprofile&u=67799 ?? because he send a msg to me with the same source code ! Link to comment
SoMoRay Posted May 1, 2013 Author Share Posted May 1, 2013 Are you :https://forum.multitheftauto.com/memberlist.php?mode=viewprofile&u=67799 ?? because he send a msg to me with the same source code ! no im dowing with him police job he is my friend Link to comment
iPrestege Posted May 1, 2013 Share Posted May 1, 2013 -- Server Side And I Add The Tag With It To Appear for all players! -- addEvent("Setting",true) addEventHandler("Setting",root, function( ) setPlayerNametagText ( source, '[COP]' .. getPlayerName ( source ) ) giveWeapon ( source , 3 , 1 ) setPlayerTeam ( source , Police ) setElementModel( source,280 ) end ) -- Client Side -- local playerWhoUses = getLocalPlayer() addEventHandler ( 'onClientGUIClick', GUIEditor.button[1], function( ) if ( getPlayerWantedLevel ( ) == 0 ) then setElementData ( playerWhoUses, 'job', 'police' ) triggerServerEvent("Setting",getLocalPlayer()) outputChatBox ( '', 0, 0, 255, false ) outputChatBox ( '', 0, 0, 255, false ) outputChatBox ( '', 0, 0, 255, false ) else outputChatBox ( '', 0, 0, 255, false ) end end,false ) 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