[HELP] get_distance_f
I have a problem with get_distance_f
When i type in chat "lala (registered in clcmd)" automatically creates a entity and shows for me the distance between me and ent... But it did not work... In first time it works fine but when i type again, the entity creates normally but it shows "[", "u", "(" of distance... Whats wrong with the code? PHP Code:
|
Re: [HELP] get_distance_f
The main problem in that code is that you're printing float values as string, that's why it's printing weird stuff.
And: - Entities are created in the center of the map by default, you're getting distance between player and center of map basically. - I think pev_sequence accepts numbers not strings, like the engine's EV_INT_sequence. - You don't need to create a variable if you're going to use the function only once. |
| All times are GMT -4. The time now is 19:44. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.