PHP Code:
client_print(id,print_chat, "Entity: %d (%d)",Ent, iOrigin[0])
-------->
PHP Code:
client_print(id,print_chat, "Entity: %d (%d)",Ent, iOrigin[id][X])
It will return show you only the X coordinate.
Wait... Why do you called the directive MAX_PLAYERS like a player index?
You aren't understanding how it works...
I'll give you an example.
PHP Code:
entity_get_vector(Ent[id], EV_VEC_origin,Origin[MAX_PLAYERS]);
----->
PHP Code:
entity_get_vector(Ent[id], EV_VEC_origin,Origin[id]);
Do the same thing for the next lines.
Question: Will you use the origin variables for other reasons?, Else, you haven't to create it like a global variable and with a dimension more than the origin cells.
PHP Code:
#define MAX_PLAYERS 32
enum _:C_VECTOR
{
X = 0,
Y,
Z
};
new Float:fOrigin[MAX_PLAYERS+1][C_VECTOR];
new iOrigin[MAX_PLAYERS+1][C_VECTOR];
public RocketTrail(id)
{
Ent[id] = find_ent_by_class(-1, "ntf_squeak")
entity_get_vector(Ent[id], EV_VEC_origin,fOrigin[id]);
iOrigin[id][X] = floatround(fOrigin[id][X])
iOrigin[id][Y] = floatround(fOrigin[id][Y])
iOrigin[id][Z] = floatround(fOrigin[id][Z])
client_print(id,print_chat, "Entity: %d (%d; %d; %d)",Ent, iOrigin[id][X], iOrigin[id][Y], iOrigin[id][Z])
message_begin(MSG_BROADCAST, SVC_TEMPENTITY);
write_byte(17);
write_coord(iOrigin[id][X]);
write_coord(iOrigin[id][Y]);
write_coord(iOrigin[id][Z]);
write_short(DustSpr)
write_byte(0.5);
write_byte(250);
message_end();
}
__________________