Raised This Month: $12 Target: $400
 3% 

[TUT] [BB] How to add lock/unlock after preptime/buildtime


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-16-2020 , 07:14   [TUT] [BB] How to add lock/unlock after preptime/buildtime
Reply With Quote #1

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(idprint_center"%L"LANG_SERVER"FAIL_LOCK");
        return 
PLUGIN_HANDLED;
    } 
To
PHP Code:
if (!g_boolCanBuild && g_iLockBlocks && !access(idFLAGS_LOCKAFTER))
    {
        
client_print(idprint_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!
Supremache is offline
XoNix
Junior Member
Join Date: Jul 2021
Location: Algeria
Old 07-27-2021 , 07:57   Re: [TUT] [BB] How to add lock/unlock after preptime/buildtime
Reply With Quote #2

how ican add this


public native_get_flags_lockafter() return FLAGS_LOCKAFTER
XoNix is offline
XoNix
Junior Member
Join Date: Jul 2021
Location: Algeria
Old 07-27-2021 , 07:58   Re: [TUT] [BB] How to add lock/unlock after preptime/buildtime
Reply With Quote #3

public native_get_flags_lockafter() return FLAGS_LOCKAFTER
XoNix is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-11-2021 , 04:46   Re: [TUT] [BB] How to add lock/unlock after preptime/buildtime
Reply With Quote #4

You don't need to add this native, if you want to use that flag with other plugin then you have to add this..
__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.
Supremache is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 14:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode