Quote:
Originally Posted by lexzor
that error means you don't have a native called get_gamerules_round_end_time.
you forgot to include the .inc file of the main plugin or the native doesn't exist in plugin and .inc file
|
Can you do it for me please. It was for time it
I did that.
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);
// Get the remaining time in seconds
new round_time = cvar("mp_roundtime") * 60;
new elapsed_time = get_gametime();
new remaining_time = round_time - elapsed_time;
// Only allow VIPs to lock base during last 20 seconds of the round
if (remaining_time <= 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;
}
//// basebuilder54.sma
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuild er54.sma(1025) : error 017: undefined symbol "cvar"
// C:\Program Files (x86)\Steam\steamapps\common\Half-Life\czero\addons\amxmodx\scripting\basebuild er54.sma(1026) : warning 213: tag mismatch