Jump to content

1 question and 1 bug(?)


pa3ck

Recommended Posts

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
  • Moderators

Answer for question 2.

This bug is created by:

  • setElementHealth to 0
    setElementFrozen to true
    setElementCollisionsEnabled to false
    animation 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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...