In this tutorial, I going to explaining: How to add lock/unlock after preptime/buildtime
1. Download basebuilder mod v6.5
2. Open sma file And add this codes
PHP Code:
#define FLAGS_LOCKAFTER ADMIN_ALL
3. Go to public plugin_natives() section and add this code
PHP Code:
register_native("bb_get_flags_lockafter","native_get_flags_lockafter", 1)
4. Go to public cmdLockBlock(id) section and replace this code
From
PHP Code:
if (!g_boolCanBuild && g_iLockBlocks)
{
client_print(id, print_center, "%L", LANG_SERVER, "FAIL_LOCK");
return PLUGIN_HANDLED;
}
To
PHP Code:
if (!g_boolCanBuild && g_iLockBlocks && !access(id, FLAGS_LOCKAFTER))
{
client_print(id, print_center, "%L", LANG_SERVER, "FAIL_LOCK");
return PLUGIN_HANDLED;
}
5. Add this code down to the last lines of plugin with natives sections
PHP Code:
public native_get_flags_lockafter() return FLAGS_LOCKAFTER
Enjoy!