AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   Solved infinite ammo fix (https://forums.alliedmods.net/showthread.php?t=327822)

XHUNTERX 10-11-2020 22:47

infinite ammo fix
 
I know it may sound strange to you but I need it

I want this command to be executed at the 10th and 60th seconds of each round.

sv_infinite_ammo 0

Thanks already for your help

Drixevel 10-12-2020 02:51

Re: I need help
 
Code:

#pragma semicolon 1
#pragma newdecls required

#include <sourcemod>

public Plugin myinfo =
{
        name = "a plugin that exists",
        author = "Drixevel",
        description = "this plugin is a thing",
        version = "1.0.0",
        url = "https://drixevel.dev/"
};

public void OnPluginStart()
{
        HookEvent("round_start", Event_OnRoundStart);
}

public void Event_OnRoundStart(Event event, const char[] name, bool dontBroadcast)
{
        CreateTimer(10.0, Timer_ChangeConVar, _, TIMER_FLAG_NO_MAPCHANGE);
        CreateTimer(60.0, Timer_ChangeConVar, _, TIMER_FLAG_NO_MAPCHANGE);
}

public Action Timer_ChangeConVar(Handle timer)
{
        FindConVar("sv_infinite_ammo").IntValue = 0;
}


XHUNTERX 10-12-2020 12:17

Re: I need help
 
thank you so much


All times are GMT -4. The time now is 04:38.

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