Thats my function
PHP Code:
public pfn_touch(ent, id)
{
if (id > 0 && id <= 32)
{
if (is_user_alive(id))
{
if (isBlock(ent))
{
new blockType = entity_get_int(ent, EV_INT_body);
if (blockType == BM_BHOP || blockType == BM_BARRIER_CT || blockType == BM_BARRIER_T || blockType == BM_BHOP_NOSLOW || blockType == BM_NONADMIN || blockType == BM_DELAYED)
{
if (!task_exists(TASK_BHOPSOLIDNOT + ent) && !task_exists(TASK_BHOPSOLID + ent))
{
new CsTeams:team = cs_get_user_team(id);
if (blockType == BM_BARRIER_CT && team == CS_TEAM_T)
{
taskSolidNot(TASK_BHOPSOLIDNOT + ent);
}
else if (blockType == BM_BARRIER_T && team == CS_TEAM_CT)
{
taskSolidNot(TASK_BHOPSOLIDNOT + ent);
}
else if (blockType == BM_BHOP || blockType == BM_BHOP_NOSLOW)
{
set_task(0.1, "taskSolidNot", TASK_BHOPSOLIDNOT + ent);
}
else if (blockType == BM_NONADMIN && get_user_flags(id) & ADMIN_LEVEL_H)
{
taskSolidNot(TASK_BHOPSOLIDNOT + ent);
}
else if (blockType == BM_DELAYED)
{
set_task(2.0, "taskSolidNot", TASK_BHOPSOLIDNOT + ent);
}
}
}else{
new Float: Angel[3];
entity_get_vector(ent,EV_VEC_angles,Angel);
//client_print(id,print_chat,"Angle: %f %f %f",Angel[0],Angel[1],Angel[2]);
if(floatround(Angel[0]) == 90){
if(blockType == BM_TRAMPOLINE)
set_task(0.0,"actionTrampoline",id);
else if(blockType == BM_LOWTRAMPOLINE)
set_task(0.0,"actionLowTrampoline",id);
else if(blockType == BM_HIGHTRAMPOLINE){
set_task(0.0,"actionHighTrampoline",id);
}
}
//Slide turas pie apaksas blokam
if(blockType == BM_SLIDE){
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] = 100.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
client_print(id,print_chat,"Velocity 100");
}
}
}
}
}
return PLUGIN_CONTINUE;
}
And thats not work, its only show in chat thats text velocity 100
PHP Code:
if(blockType == BM_SLIDE){
new Float:velocity[3];
entity_get_vector(id, EV_VEC_velocity, velocity);
velocity[2] = 100.0;
entity_set_vector(id, EV_VEC_velocity, velocity);
client_print(id,print_chat,"Velocity 100");
}