Msypon Posted June 12, 2013 Posted June 12, 2013 why "screen[2]" on line 7? addEventHandler('onClientRender', root, function() for bone = 1, 54 do local bonePos = {getPedBonePosition(localPlayer, bone)} if bonePos[1] then local screen = {getScreenFromWorldPosition(unpack(bonePos))} if screen[1] then dxDrawText(''..bone, screen[1], screen[2]) end end end end)
Castillo Posted June 12, 2013 Posted June 12, 2013 I'm afraid I don't understand what do you mean, "2" is the index.
Moderators IIYAMA Posted June 12, 2013 Moderators Posted June 12, 2013 getScreenFromWorldPosition does not return a table. Only 3 floats. FloatFloat is an abreviation of 'Floating Point Number'. A floating point number is one with a decimal point, i.e. it can contain values such as 5.5 or 3.142. An int on the other hand can only hold whole numbers. ReturnsReturns two x, y floats indicating the screen position and float distance between screen and given position if successful, false otherwise these will probably put in the table. > screen screen[1] = x screen[2] = y screen[3]= distance
Msypon Posted June 12, 2013 Author Posted June 12, 2013 ok ty, another question, can we cancel the event onClientPlayerWeaponFire?
iPrestege Posted June 12, 2013 Posted June 12, 2013 ok ty, another question, can we cancel the event onClientPlayerWeaponFire? No but : onClientWeaponFire You can !
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