As it says the title. This does not me work.
PHP Code:
public fw_CmdStart( id, uc_handle, randseed )
{
if (!is_user_alive(id))
return FMRES_IGNORED
new button = get_uc( uc_handle , UC_Buttons );
new oldbutton = pev(id, pev_oldbuttons)
if( button & IN_USE && !(oldbutton & IN_USE)) {
activate_button(id)
}
return FMRES_IGNORED;
}
public activate_button(id)
{
new ent, bodypart
get_user_aiming (id,ent,bodypart)
new szClass[10], szTarget[7];
entity_get_string(ent, EV_SZ_classname, szClass, 9);
entity_get_string(ent, EV_SZ_targetname, szTarget, 6);
if (equal(szClass, "func_button") || equal(szTarget, "trap3")) {
dllfunc(DLLFunc_Use, -1, 0)
}
}
__________________