Firespider Posted July 24, 2022 Share Posted July 24, 2022 I don't know what the problem is, please help Link to comment
AngelAlpha Posted July 24, 2022 Share Posted July 24, 2022 5 minutes ago, Firespider said: I don't know what the problem is, please help No parent for guiLabel Link to comment
Firespider Posted July 24, 2022 Author Share Posted July 24, 2022 Parent what too? (Sorry for being so stupid, I'm just starting and I don't really know the expressions :D) Link to comment
AngelAlpha Posted July 24, 2022 Share Posted July 24, 2022 (edited) 21 minutes ago, Firespider said: Parent what too? (Sorry for being so stupid, I'm just starting and I don't really know the expressions :D) guiCreateLabel wiki Parent is GUI element to which attached other GUI element (buttons, edits, labels, gridlists and other) Edited July 24, 2022 by AngelAlpha Link to comment
Firespider Posted July 24, 2022 Author Share Posted July 24, 2022 Thanks There would be one more thing I don't understand why it doesn't work either https://cdn.discordapp.com/attachments/582126900915208214/1000829375421349888/unknown.png SetElementDimension is not good. But it doesn't show any error code Link to comment
Rick_Grimes Posted July 25, 2022 Share Posted July 25, 2022 try this: local playerMarker = createMarker(254,78,1003,"cylinder",1,255,0,0,255) setElementDimension(playerMarker,50) function handlePlayerMarker(hitElement) local elementType = getElementType(hitElement) outputChatBox("type /dutyonr",hitElement) outputChatBox("type /dutyoffr",hitElement) end addEventHandler("onMarkerHit",playerMarker,handlePlayerMarker) -- local kapcsolat = exports["mysql"]:getConnection() function Duty1(thePlayer) local theTeam = getPlayerTeam(thePlayer) if not theTeam or not getTeamName(theTeam) == "ORFK" then outputChatBox("error",thePlayer) return end setElementModel(thePlayer,266) outputChatBox("you are duty now",thePlayer) giveWeapon(thePlayer,31,200) giveWeapon(thePlayer,3,200) giveWeapon(thePlayer,22,200) end addCommandHandler("dutyonr",Duty1) function Duty2(thePlayer) local theTeam = getPlayerTeam(thePlayer) if not theTeam or not getTeamName(theTeam) == "ORFK" then outputChatBox("error",thePlayer) return end setElementModel(thePlayer,1) takeAllWeapons(thePlayer) outputChatBox("you are not duty now",thePlayer) end addCommandHandler("dutyoffr",Duty2) you can use /debugscript 3 for show errors and you had problem in outputChatbox and you can check what changed in this code.... 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