pa3ck Posted July 1, 2014 Share Posted July 1, 2014 Hey! I got 2 questions ( actually ) here. First one is, is there a function for setting the color of a gui column? The second one is, I'm experiencing a "death" bug. I'm building my own RP gamemode and I'm using setElementPosition for my teleport commands. Sometimes I see people fall and die, but they don't actually die... They can't see it themselves, same thing happens to me. They see me "dying" but I can't see it myself... Right after they / I die, they / I just get up and walk forward... Is it a bug? Thanks in advance! Link to comment
dugasz1 Posted July 1, 2014 Share Posted July 1, 2014 For the question: For example: guiSetProperty ( element, "TextColour", "ff0000" ) I think it's will work. More info: http://web.archive.org/web/20120706081430/http://cegui.org.uk/static/WindowsLookProperties.html#ListboxItem Link to comment
Moderators IIYAMA Posted July 1, 2014 Moderators Share Posted July 1, 2014 Answer for question 2. This bug is created by: setElementHealth to 0 setElementFrozen to truesetElementCollisionsEnabled to falseanimation to forced without interruption-- and maybe more. Make sure the player is not frozen and collision is enabled, animation is stopped. Never set player health to zero, always use the killPed(serverside) function. I hope it helps you to solve this problem in the code. Link to comment
pa3ck Posted July 2, 2014 Author Share Posted July 2, 2014 Thank you for both answers! @dugasz Rows and Columns return numbers, they're not an element, so guiSetProperty cannot be used here ( thanks anyways! ) @IIYAMA Thanks buddy! I used to use setElementHealth ( element, 0 ), so that might be it. Also, I have an animation cancel bind, which lets you cancel the current animation using "empty" setPedAnimation. Do you think it would affect it? Should I use setPedAnimationProgress w/ any anims? Thanks! EDIT: I see there's 'ColumnsSizable' and 'ColumnsMovable' settings for guiSetProperty. AFAIK, guiSetProperty requires a GUI element, but rows and columns are not elements... How does it work? Link to comment
Sasu Posted July 2, 2014 Share Posted July 2, 2014 Did you try with the gridlist element? Link to comment
Moderators IIYAMA Posted July 2, 2014 Moderators Share Posted July 2, 2014 I think your problem was the setElementHealth to 0, most of the time the problem. If that doesn't work setPedAnimation also to false/'empty'. Link to comment
pa3ck Posted July 2, 2014 Author Share Posted July 2, 2014 @ Sasu Yes, I did. I used these 2 simple lines: guiSetProperty ( gridlist, "ColumnsMovable", false ) guiSetProperty ( gridlist, "ColumnsSizeable", false ) But it says bad argument, it's looking for strings. I tried "false", but that won't change anything, thanks though. @IIYAMA I'm using my own weapon damage system, so when you get shot with sniper for example it takes off 100 off your health, I think that was the problem, thank you! Didn't get a chance to test it though, gonna test it today. 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