Page 1 of 2

Cerere plugin ultimul ramas!

Posted: 21 May 2019, 12:09
by NemeSyS17
Plugin Cerut: Ultimul CT / Furien!
Descriere (adica ce face el mai exact): Vreau un plugin care sa ofere 5k ultimului CT / Furien!
Cu mesaj
[FR] X a primit 5 k pentru ca este ultimul "Furien / Anti-furien"
Serverul ruleaza (HLDS/ReHLDS): ReHLDS
Versiune AMX Mod X: -
Modul Serverului: Furien

Re: Cerere plugin ultimul ramas!

Posted: 25 May 2019, 12:34
by NemeSyS17
UP!

Re: Cerere plugin ultimul ramas!

Posted: 27 May 2019, 12:10
by NemeSyS17
up.

Re: Cerere plugin ultimul ramas!

Posted: 31 May 2019, 13:23
by NemeSyS17
up.

Re: Cerere plugin ultimul ramas!

Posted: 06 Jun 2019, 10:05
by NemeSyS17
up?

Re: Cerere plugin ultimul ramas!

Posted: 06 Oct 2019, 22:34
by NemeSyS17
up?

Re: Cerere plugin ultimul ramas!

Posted: 08 Oct 2019, 14:15
by levin
ce 5k omule, vrei ajutor, da nu ești în stare să faci o cerere

Re: Cerere plugin ultimul ramas!

Posted: 08 Oct 2019, 14:39
by DevilBoy.eXe
L E V I N wrote:
08 Oct 2019, 14:15
ce 5k omule, vrei ajutor, da nu ești în stare să faci o cerere
Mai mult că sigur că se referă la 5000$

Re: Cerere plugin ultimul ramas!

Posted: 08 Oct 2019, 15:26
by NemeSyS17
L E V I N wrote:
08 Oct 2019, 14:15
ce 5k omule, vrei ajutor, da nu ești în stare să faci o cerere
5000$ L E V I N!

Re: Cerere plugin ultimul ramas!

Posted: 08 Oct 2019, 16:48
by levin

Code: Select all

#include <amxmodx>
#include <cstrike>

new const BANI = 5000

public plugin_init()	register_logevent("logevent_round_end", 2, "1=Round_End")

public logevent_round_end()
{
	new ter=get_player_num(1,1)
	new ct=get_player_num(2,1)
	if(ter)	cs_set_user_money(ter,cs_get_user_money(ter)+BANI,1)
	if(ct)	cs_set_user_money(ct,cs_get_user_money(ct)+BANI,1)
}

stock get_player_num(team, alive)
{
	static player_num
	player_num = 0
	
	for(new i = 0; i < get_maxplayers(); i++)
	{
		if(!is_user_connected(i))	continue
		if(alive)	if(!is_user_alive(i))	continue
		
		if(team == 1)	if(cs_get_user_team(i) != CS_TEAM_T)	continue
		else if(team == 2)	if(cs_get_user_team(i) != CS_TEAM_CT)	continue
		player_num++
	}
	return player_num
}

Re: Cerere plugin ultimul ramas!

Posted: 08 Oct 2019, 19:07
by NemeSyS17
L E V I N wrote:
08 Oct 2019, 16:48

Code: Select all

#include <amxmodx>
#include <cstrike>

new const BANI = 5000

public plugin_init()	register_logevent("logevent_round_end", 2, "1=Round_End")

public logevent_round_end()
{
	new ter=get_player_num(1,1)
	new ct=get_player_num(2,1)
	if(ter)	cs_set_user_money(ter,cs_get_user_money(ter)+BANI,1)
	if(ct)	cs_set_user_money(ct,cs_get_user_money(ct)+BANI,1)
}

stock get_player_num(team, alive)
{
	static player_num
	player_num = 0
	
	for(new i = 0; i < get_maxplayers(); i++)
	{
		if(!is_user_connected(i))	continue
		if(alive)	if(!is_user_alive(i))	continue
		
		if(team == 1)	if(cs_get_user_team(i) != CS_TEAM_T)	continue
		else if(team == 2)	if(cs_get_user_team(i) != CS_TEAM_CT)	continue
		player_num++
	}
	return player_num
}
Imi adaugi te rog si mesaje?
[FURIEN] Nick - este ultimul FURIEN / ANTI-FURIEN si primeste (5000$) BONUS!

Re: Cerere plugin ultimul ramas!

Posted: 09 Oct 2019, 17:28
by levin

Code: Select all

#include <amxmodx>
#include <cstrike>

new const CHAT_TAG[] = "[FURIEN]"
new const BANI = 5000

public plugin_init()	register_logevent("logevent_round_end", 2, "1=Round_End")

public logevent_round_end()
{
	new ter=get_player_num(1,1)
	new ct=get_player_num(2,1)
	if(ter)
	{
		cs_set_user_money(ter,cs_get_user_money(ter)+BANI,1)
		client_print(0,print_chat,"%s %s - este ultimul FURIEN si primeste (%d$) BONUS!",CHAT_TAG,get_name(ter),BANI)
	}
	if(ct)
	{
		cs_set_user_money(ct,cs_get_user_money(ct)+BANI,1)
		client_print(0,print_chat,"%s %s - este ultimul ANTI-FURIEN si primeste (%d$) BONUS!",CHAT_TAG,get_name(ct),BANI)
	}
}

stock get_player_num(team, alive)
{
	static player_num
	player_num = 0
	
	for(new i = 0; i < get_maxplayers(); i++)
	{
		if(!is_user_connected(i)||is_user_bot(i)||is_user_hltv(i))	continue
		if(alive)	if(!is_user_alive(i))	continue
		
		if(team == 1)	if(cs_get_user_team(i) != CS_TEAM_T)	continue
		else if(team == 2)	if(cs_get_user_team(i) != CS_TEAM_CT)	continue
		player_num++
	}
	return player_num
}

stock get_name(id)
{
	new name[32]
	get_user_name(id,name,charsmax(name))
	return name
}