Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Sign in to follow this  
eagledude4

player position to 3 digits

Recommended Posts

I would like to know how to convert the player's position to 3 digit values. Is it possible?

hint format ["%1 called for a taxi from %2 at %3, %4.", _player, _town, _pos1, _pos2];

pos1 and pos2 returns 5 digit values with decimals.

Edited by eagledude4

Share this post


Link to post
Share on other sites

hint format ["%1 called a taxi at X:%2, Y:%3.", _player, _pos1, pos2];

to

hint format ["%1 called a taxi at X:%2, Y:%3.", _player, _pos1, _pos2];

Share this post


Link to post
Share on other sites

@SaMatra: Oh right, I fixed it a while ago but you replied before I had the chance to change the post :P

@Panther42:

_pos1 = [_pos select 0, 3] call CBA_fnc_formatNumber;
_pos2 = [_pos select 1, 3] call CBA_fnc_formatNumber;

Doesn't seem to work.

Edited by eagledude4

Share this post


Link to post
Share on other sites

Are you replying to me, eadledude4?

try with 2, as it defaults to 1...maybe not possible with that function. I was thinking it was but, will look further

Edited by panther42

Share this post


Link to post
Share on other sites

Yes I was.

Changing the parameter doesnt seem to change the return values. Also, I'm not very good with script math.

Edited by eagledude4

Share this post


Link to post
Share on other sites

Sort of, but I wanted to display 2 different values. One for x and one for y. I guess this is fine for now, thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×