AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   engine.inc problems (https://forums.alliedmods.net/showthread.php?t=13583)

kosmo111 05-21-2005 23:17

engine.inc problems
 
Several of the functions located in the engine.inc include file arent recognized when i use them. The .sma file complies without a problem but when it tries to load the plugin in game it says "plugin uses unknown function"

Some of the functions that dont seem to work for me are--
entity_set_origin
entity_get_string
is_valid_ent

I have the file included in the .sma .... and I'm kinda stumped.. any help is appreciated

v3x 05-21-2005 23:20

And the Engine module IS enabled?

kosmo111 05-21-2005 23:24

wow, um ok thanks.... kinda feel a little stupid now.. that was the problem.....

But on an unrelated note, is there a command to get the origin of an entity? I havent coded since regular amx and couldnt find a replacement for the get_entity_origin command.

v3x 05-21-2005 23:29

Code:
new Float:origin[3] entity_get_vector(id,EV_VEC_origin,origin)
:D

xeroblood 05-21-2005 23:31

Using Engine Module:
Code:
// Get Origin Vector as Float new Float:fOrigin[3] entity_get_vector( playerID, EV_VEC_origin, fOrigin ) // Convert Origin Vector to Integer (requires engine_stocks.inc) new iOrigin[3] FVecIVec( fOrigin, iOrigin )

Then you can do what you want with either Origin (Float vec or Int vec)

Hope that helps!

Edit:
:P v3x you posted same time as me! :!:

Edit2:
:shock: Haha! We did it again! :D :P

v3x 05-21-2005 23:31

Looks like we were posting @ the same time, xero. :P


All times are GMT -4. The time now is 16:49.

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