PHP Code:
public Something(id)
{
if (GetDistanceFromGround(id) == 2)
{
client_print(0, print_chat, "testing");
}
}
GetDistanceFromGround(id)
{
// Check if player is on ground?
// if (entity_get_int(client, EV_INT_flags) & FL_ONGROUND)
// return 0;
new Float:clientOrigin[3], Float:groundOrigin[3];
entity_get_vector(id, EV_VEC_origin, clientOrigin);
//drop_to_floor(id);
entity_get_vector(id, EV_VEC_origin, groundOrigin);
entity_set_origin(id, clientOrigin);
return floatround(vector_distance(clientOrigin, groundOrigin));
}
Why doesn't this work then?
I jump up and didn't get that message and when i jump down or fell down i still didn't get that message!
__________________