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

Solved infinite ammo fix


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 10-11-2020 , 22:47   infinite ammo fix
Reply With Quote #1

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

Last edited by XHUNTERX; 10-13-2020 at 09:18.
XHUNTERX is offline
Drixevel
AlliedModders Donor
Join Date: Sep 2009
Location: Somewhere headbangin'
Old 10-12-2020 , 02:51   Re: I need help
Reply With Quote #2

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;
}
Drixevel is offline
XHUNTERX
Senior Member
Join Date: Aug 2019
Location: World
Old 10-12-2020 , 12:17   Re: I need help
Reply With Quote #3

thank you so much
XHUNTERX 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 22:41.


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