Page 1 of 1

Restricție Arme

Posted: 03 May 2022, 22:56
by xSaG
Nume plugin: Restricție Arme
Descriere: Restricționează anumite arme de pe server.
Autor: </xSaG>
Versiune: 1.0
Download: https://www81.zippyshare.com/v/c2Y8a7tQ/file.html

Re: Restricție Arme

Posted: 05 May 2022, 21:22
by Rainq
poti sa faci sa restrictioneze unele arme dupa x runde ?

Re: Restricție Arme

Posted: 06 May 2022, 21:58
by xSaG
Rainq wrote:
05 May 2022, 21:22
poti sa faci sa restrictioneze unele arme dupa x runde ?
Înlocuieste :

Code: Select all

	for(w = 0; w < size; w++)
	{
		Weapons.GetString(w, weapons_restricted, sizeof(weapons_restricted));
		if(StrContains(weapon, weapons_restricted, false) != -1)
		{
			PrintToChat(client, "Această armă este restricționată!");
			return Plugin_Handled;
		}
	}
Cu:

Code: Select all

	if(GetRoundCount() == ce runda vrei tu)
	{
		for(w = 0; w < size; w++)
		{
			Weapons.GetString(w, weapons_restricted, sizeof(weapons_restricted));
			if(StrContains(weapon, weapons_restricted, false) != -1)
			{
				PrintToChat(client, "Această armă este restricționată!");
				return Plugin_Handled;
			}
		}
	}
apoi adăugă jos de tot

Code: Select all

stock int GetRoundCount()
{
	return GameRules_GetProp("m_totalRoundsPlayed");
}