Im getting an error, i did the locking base for 20 seconds of end round for VIP but getting this error tried to find an const/include didn't find it
//// basebuilder54.sma
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuild er54.sma(1025) : error 017: undefined symbol "get_gamerules_round_end_time"
PHP Code:
public cmdLockBlock(id)
{
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);
// Only allow VIPs to lock base during last 20 seconds of the round
if (get_gamerules_round_end_time() - get_gametime() <= 20)
{
if (!access(id, ADMIN_VOTE))
{
client_print(id, print_chat, "Only VIPs can lock the base during the last 20 seconds of the round.");
return PLUGIN_HANDLED;
}
}
// Admins can lock the base any time
else if (!access(id, LOCK_BLOCKS))
{
return PLUGIN_HANDLED;
}
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
}
__________________