Jump to content
Sign in to follow this  
MAD T

onPlayerDisconnected and getPlayerUID

Recommended Posts

Hi everyone.

I have a question about onPlayerDisconnected. When i use it like this,

onPlayerDisconnected "[_id, _name, _uid] execVM "PlayerDisconnected.sqf";

_uid always gives me a number like 1.4253e+006 which is actualy the player ID but just with some zeros added to the end. I know from the wiki page that the value is returned in a float format.

_uid = getPlayerUID vehicle player;

getPlayerUID Gives me the player ID in a correct format like 942107.

For example if i want to compare these both values how do i get the one from onPlayerDisconnected in a correct format? Other question. What purpose or use does the float value has? Any help is much appreciated on this.

Edited by MAD T

Share this post


Link to post
Share on other sites
I know from the wiki page that the value is returned in a float format.

I would like to know to what wiki you are referencing here. _uid in onplayerdisconnected returns the same value as getplayeruid does, your problem is something else.

Be advised, if this is all the code you use regarding to onplayerdisconnected, you messed with the quotes:

onPlayerDisconnected [color="Blue"]"[/color][_id, _name, _uid] execVM [color="Red"]'[/color]PlayerDisconnected.sqf[color="Red"]'[/color];[color="Blue"]"[/color];

Share this post


Link to post
Share on other sites

Im sry i misread something on the wiki. Your right it gives me the correct ID in a number value and getPlayerUID gives me a string. My question should be rather how do i convert numbers to a string :o

I was just confused about the value it gave me because my ID is 7 numbers long. Thanks for your help anyway.

Edited by MAD T

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×