|
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
|
04-13-2017
, 08:40
Re: [CSGO] Hud & armor plugin
|
#6
|
Quote:
Originally Posted by Sw33T3R
Code...
|
You create a new CreateTimer every "round start" without kill the previous timer, so it will accumulated (Memory leak issue).
The code should be:
Spoiler
PHP Code:
#include <sourcemod>
#include <cstrike>
public Plugin myinfo =
{
name = "HUD",
author = "Nevvy",
description = "",
version = "",
url = "Nevvy.pl"
};
public OnPluginStart()
{
CreateTimer(5.0, HUD, _, TIMER_REPEAT);
}
public Action HUD(Handle timer)
{
for (new i = 1; i <= MaxClients; i++)
{
if (IsClientInGame(i))
{
SetHudTextParams(-1.0, 0.1, 5.0, 255, 255, 255, 255, 0, 0.1, 0.1, 0.1);
ShowHudText(i, 5, "Oldcs.1TAP.Ro");
}
}
}
__________________
|
|
|
|