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

extend round time plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Zyten
Senior Member
Join Date: Jan 2018
Old 04-29-2018 , 20:36   extend round time plugin
Reply With Quote #1

anyone can make extend round time plugin

this plugin from myjailbreak is good example but this is only for Warden. i need one for Admin_kick flag

Spoiler
Zyten is offline
zwetch
Senior Member
Join Date: Aug 2015
Location: South Africa
Old 04-30-2018 , 05:16   Re: extend round time plugin
Reply With Quote #2

Quote:
Originally Posted by Bacardi View Post
Super admin commands, or advanced commands.
Extend Map



If you want only map extend feature, then you can try this.
This extend or short mp_timelimit
admin who have flag "g" changemap can use it. Edit code or override command from SM configs.

sm_extend 10 = add 10 minutes
sm_extend -10 = short -10 minutes


PHP Code:
new Handle:mp_timelimit INVALID_HANDLE;
new 
timelimit;

public 
OnPluginStart()
{
    
RegAdminCmd("sm_extend"admcmd_extendADMFLAG_CHANGEMAP"sm_extend <minutes> - Extend map time or -short");

    
mp_timelimit FindConVar("mp_timelimit");
    
timelimit GetConVarInt(mp_timelimit);
    
HookConVarChange(mp_timelimitConVarChanged);
}

public 
ConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[])
{
    
timelimit GetConVarInt(mp_timelimit);
}

public 
Action:admcmd_extend(clientargs)
{
    if (
args 1)
    {
        
ReplyToCommand(client"[SM] Usage: sm_extend <minutes> - Extend map time or -short");
        return 
Plugin_Handled;
    }

    new 
String:arg[10];
    
GetCmdArg(1argsizeof(arg));

    
decl time;
    
time 0;

    if((
time StringToInt(arg)) != 0)
    {

        
SetConVarInt(mp_timelimittimelimit time);

        if(
time 0)
        {
            
ShowActivity2(client"[SM] ""Extend map time %i minutes"time);
            
LogAction(client, -1"\"%L\" Extend map time"clienttime);
        }
        else
        {
            
ShowActivity2(client"[SM] ""Shorten map time %i minutes"time);
            
LogAction(client, -1"\"%L\" Shorten map time"clienttime);
        }
    }

    return 
Plugin_Handled;

Just override sm_extend in sourcemod/admin_overrides.cfg or override the plugin that u are originally using.

Override will look like:

"sm_extend" "c"
__________________
https://forums.alliedmods.net/signaturepics/sigpic262740_1.gif

Last edited by zwetch; 04-30-2018 at 05:17.
zwetch is offline
Zyten
Senior Member
Join Date: Jan 2018
Old 04-30-2018 , 09:15   Re: extend round time plugin
Reply With Quote #3

i tried this code u send me the problem is those codes add maptime over all not round time

i mean by maptime is the automatic maptime change (45min untill next map)

what i am looking is round rime u can add it by command the .sp i send orginally does that but only for warden

Last edited by Zyten; 04-30-2018 at 09:19.
Zyten is offline
Reply



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 10:45.


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