AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Long to Coord (https://forums.alliedmods.net/showthread.php?t=51362)

Cheap_Suit 02-16-2007 14:07

Long to Coord
 
How do you covert a numbers from type ARG_LONG to type ARG_COORD?

An example would be in ClCorpse where the origin is in long.

XxAvalanchexX 02-16-2007 18:36

Re: Long to Coord
 
In AMXX scripting you basically only have two major data types: integer and float. Reading or setting an ARG_LONG should be done as an integer, whereas reading or setting an ARG_COORD should be done as a float (except for the default write_coord, it accepts them as integer for some reason). AMXX will convert them to the appropiate data type (long, short, etcetera) when sending to the game DLL.

Cheap_Suit 02-16-2007 19:41

Re: Long to Coord
 
Okay. I totally didnt asked the right question. But this is what im trying to do.

I saved the users origin in a global var with pev_origin. And it does not match the origin from ClCorpse event. So like, how do you use this origin if they are in long instead of coord? I was thinking to "convert" them some how.

XxAvalanchexX 02-16-2007 19:52

Re: Long to Coord
 
Quote:

Originally Posted by AMWiki
Note: Coord and Delay is in non-standard unknown format.


Cheap_Suit 02-16-2007 19:55

Re: Long to Coord
 
Damn. Thanks for the info.

Oskar 02-17-2007 08:39

Re: Long to Coord
 
Is it possible to set an entitys position using long?
Becose then you could get that entitys position using pev_origin.


All times are GMT -4. The time now is 00:39.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.