Hi, I want locking base for VIP (ADMIN_VOTE) at 20 seconds of end rounds. I tried to time it but i've got errors.
I want of unlock can be at any times For vip and admin. Admin can lock base at any times. I will add in attachments my basebuilder
PHP Code:
public cmdLockBlock(id)
{
if (!access(id, LOCK_BLOCKS)) /// For Admin can lock at any timess
return PLUGIN_HANDLED
new ent, bodypart
get_user_aiming (id,ent,bodypart)
new tname[7], cname[10];
entity_get_string(ent, EV_SZ_targetname, tname, 6);
entity_get_string(ent, EV_SZ_classname, cname, 9);
if (!ent || !is_valid_ent(ent) || is_user_alive(ent) || ent == g_iEntBarrier || !equal(cname, "func_wall") || equal(tname, "ignore")) return PLUGIN_HANDLED
if (!IsBlockLocked(ent) && !g_MovingEnt[ent])
{
LockBlock(ent)
DispatchKeyValue(ent, "rendermode", "1");
DispatchKeyValue(ent, "rendercolor", "125.0 0.0 0.0");
g_OwnedEnts[g_EntOwner[ent]]--
g_EntOwner[ent] = 0
}
else if (IsBlockLocked(ent))
{
UnlockBlock(ent)
DispatchKeyValue(ent, "rendermode", "0");
}
return PLUGIN_HANDLED
}