Hello everybody,
I try to make the jumppads from Ricochet Maps working in Counter-Strike using this code here :
PHP Code:
public pfn_touch(ptr, ptd)
{
client_print(ptd, print_chat, "Touch detected!")
new szClassname[32]
entity_get_string(ptr, EV_SZ_classname, szClassname, 31)
if(equali(szClassname,"trigger_jump"))
{
client_print(0, print_chat, "Touched trigger_jump")
new Float:velocity[3];
entity_get_vector(ptd, EV_VEC_velocity, velocity);
velocity[2] = 500.0;
entity_set_vector(ptd, EV_VEC_velocity, velocity);
entity_set_int(ptd, EV_INT_gaitsequence, 6);
}
}
But it always shows me only the first message, the second gets never called.
This Code proofs that they are trigger_jump entitys.
PHP Code:
public func_SearchEntity(id)
{
new ent = -1
while((ent = find_ent_by_class(ent, "trigger_jump")))
{
client_print(id, print_chat, "trigger_jump found!")
}
}
Anyone knows what I'm doing wrong?
__________________