Wow, rly thx Bugsy...
and sry Arkshine... i didnt notice the "pev_angles":
Quote:
Originally Posted by Arkshine
set_pev( id, pev_angles, ?? );
|
Now i understand... thx too
And i have a quesiton... this code is fine?
PHP Code:
#include <amxmodx>
#include <fakemeta>
#define PLUGIN "Get angles & origin"
#define AUTHOR "Alucard"
#define VERSION "1.0"
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("say /origin", "get_origin")
register_clcmd("say /angles", "get_angles")
}
public get_origin(id)
{
new Float: fOrigin[ 3 ]
pev( id , pev_origin , fOrigin )
client_print(id, print_chat, "origin: %f, %f, %f", fOrigin[0], fOrigin[1], fOrigin[2])
return PLUGIN_HANDLED
}
public get_angles(id)
{
new Float: fAngles[ 3 ]
pev( id , pev_angles , fAngles )
client_print(id, print_chat, "angles: %f, %f, %f", fAngles[0], fAngles[1], fAngles[2])
return PLUGIN_HANDLED
}
I tested and i think work fine but... with /origin and "status" have some differences... see an example:
With /origin:
Quote:
|
origin: 3113.025146, -3715.923095, -699.96875
|
With command "status":
Maybe the decimals doesnt import at all but... the
z is different...
__________________