Eren07 Posted July 3, 2014 Posted July 3, 2014 Guys I've Occupation on my scoreboard and I want to change it whenever I want in admin panel Set Occupation System: http://i.imgur.com/81rIQCr.png Scoreboard: http://i.imgur.com/QjRPpMq.png Server: function setOccupation(player, occupation) setElementData(player, "Occupation") outputChatBox("You have succesfully set "..getPlayerName(player).."'s occupation to "..occupation, client, 0, 255, 0) outputChatBox(getPlayerName(client).. " has set your occupation to "..occupation, player, 255, 255, 0) end addEvent("AdminPanel.setOccupation", true) addEventHandler("AdminPanel.setOccupation", root, setOccupation) Client: function setOccupation() if (not player) then outputChatBox(errorString, 255, 0, 0) return end local occupation = guiGetText(aEdit [6]) if (occupation == "") then return end logString = getPlayerName(localPlayer).. " has changed "..getPlayerName(player).."'s occupation to "..occupation triggerServerEvent("AdminPanel.insertAdminLog", root, logString, player) triggerServerEvent("AdminPanel.setOccupation", root, player, occupation) end
MTA Team botder Posted July 3, 2014 MTA Team Posted July 3, 2014 setElementData(player, "Occupation") You are missing the value parameter: occupation Replace with: setElementData(player, "Occupation", occupation)
Eren07 Posted July 4, 2014 Author Posted July 4, 2014 I can't find it. I'm made that function by looking another function. it is setMoney. This is almost same of it.
Eren07 Posted July 4, 2014 Author Posted July 4, 2014 Any debug errors? How I can see it if there is?
novo Posted July 4, 2014 Posted July 4, 2014 By using the command /debugscript 3 https://wiki.multitheftauto.com/wiki/Se ... ebugscript
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