Cerere Plugin

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
Granea
Membru, skill +1
Membru, skill +1
Posts: 182
Joined: 15 Apr 2009, 21:14
Detinator Steam: Da
SteamID: granea21
Location: Alexandria
Has thanked: 8 times

17 Feb 2013, 12:36

As dori si eu un plugin bun sa nu pota sa intre cei din alta tara..
RoyalServer 2
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 176
Joined: 22 Sep 2009, 13:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 306 times
Been thanked: 321 times
Contact:

17 Feb 2013, 12:42

| Afiseaza codul
/* Country kicker

About:
This plugin is used if you only want ppl from spesfic countrys on your server, or wanna prevent ppl from a spesfic countrys from entering

Forum topic: http://www.amxmodx.org/forums/viewtopic.php?t=12063

Modules required: geoip

Credits:
Ops in #AMXmod @ Quakenet for alot of help ( + AssKicker & CheesyPeteza ) 
xeroblood Explode string func

Setting up plugin:
sv_country 
 1 Only allow ppl from this country  
 2 Everyone exect from this country

sv_country_name use commas to seperate country names
like:
sv_country_name "NOR,DEN"

Changelog
1.0.0( 18.12.2004 )
	- First public release
*/ 

#include <amxmodx> 
#include <geoip>

#define MAX_COUNTRYS 15

new g_Mode
new g_CC[MAX_COUNTRYS+1][4]
new g_Countries
new CountyList[128]

public plugin_init()
{ 
	register_plugin("Country kicker","1.0.0","EKS")
	register_cvar("sv_country_name","ROU")
	register_cvar("sv_country","1")
}

public plugin_cfg()
{
	g_Mode = get_cvar_num("sv_country")
	
	new CvarInfo[MAX_COUNTRYS*3+MAX_COUNTRYS+2]
	get_cvar_string("sv_country_name",CvarInfo,MAX_COUNTRYS*3+MAX_COUNTRYS+2)
	
	g_Countries = ExplodeString( g_CC, MAX_COUNTRYS, 3, CvarInfo, ',' )
	
	for(new i=0;i<=g_Countries;i++)
		format(CountyList,127,"%s %s",CountyList,g_CC)
}
stock ExplodeString( p_szOutput[][], p_nMax, p_nSize, p_szInput[], p_szDelimiter ) 
{ 
    new nIdx = 0, l = strlen(p_szInput) 
    new nLen = (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput, p_szDelimiter )) 
    while( (nLen < l) && (++nIdx < p_nMax) ) 
        nLen += (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput[nLen], p_szDelimiter )) 
    return nIdx
} 
stock IsConInArray(Con[4])
{
	for(new i=0;i<=g_Countries;i++)
	{
		if(equal(Con,g_CC))
			return 1
	}
	return 0
}
stock IsLocalIp(IP[32])
{
	new tIP[32]
	
	copy(tIP,3,IP)
	if(equal(tIP,"10.") || equal(tIP,"127"))
		return 1
	copy(tIP,7,IP)
	if(equal(tIP,"192.168"))
		return 1

	return 0
}
public client_connect(id)
{
	new userip[32]
	new CC[4]
	get_user_ip(id,userip,31,1)

	geoip_code3(userip,CC)
	if(strlen(userip) == 0)
	{
		get_user_ip(id,userip,31,1)		
		if(!IsLocalIp(userip))
			log_amx("%s made a error when passed though geoip",userip)
		return PLUGIN_HANDLED
	}
	
	if(g_Mode == 1 && !IsConInArray(CC))
	{
		server_cmd("kick #%d Only ppl from %s are allowed",get_user_userid(id),CountyList)
		
		new Name[32]
		get_user_name(id,Name,31)
		client_print(0,print_chat,"%s was kicked because he is not from %s",Name,CountyList)
	}
	else if(g_Mode == 2 && IsConInArray(CC))
	{
		server_cmd("kick #%d No %s are allowed on this server",get_user_userid(id),CC)
		
		new Name[32]
		get_user_name(id,Name,31)
		client_print(0,print_chat,"%s was kicked because he is from %s",Name,CC)
	}
	return PLUGIN_HANDLED
}

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
User avatar
Granea
Membru, skill +1
Membru, skill +1
Posts: 182
Joined: 15 Apr 2009, 21:14
Detinator Steam: Da
SteamID: granea21
Location: Alexandria
Has thanked: 8 times

17 Feb 2013, 13:43

Si ca sa numai scrie in chat la toti player
*** was kicked because he is not from RO cum fac?
User avatar
h4wk
Fost moderator
Fost moderator
Posts: 176
Joined: 22 Sep 2009, 13:10
Detinator Steam: Da
Reputatie: Fost eXtream Mod
Nume anterior : DaZ , zimpe , Dan eXtream
Location: Iasi
Has thanked: 306 times
Been thanked: 321 times
Contact:

17 Feb 2013, 13:54

| Afiseaza codul
/* Country kicker

About:
This plugin is used if you only want ppl from spesfic countrys on your server, or wanna prevent ppl from a spesfic countrys from entering

Forum topic: http://www.amxmodx.org/forums/viewtopic.php?t=12063

Modules required: geoip

Credits:
Ops in #AMXmod @ Quakenet for alot of help ( + AssKicker & CheesyPeteza ) 
xeroblood Explode string func

Setting up plugin:
sv_country 
 1 Only allow ppl from this country  
 2 Everyone exect from this country

sv_country_name use commas to seperate country names
like:
sv_country_name "NOR,DEN"

Changelog
1.0.0( 18.12.2004 )
	- First public release
*/ 

#include <amxmodx> 
#include <geoip>

#define MAX_COUNTRYS 15

new g_Mode
new g_CC[MAX_COUNTRYS+1][4]
new g_Countries
new CountyList[128]

public plugin_init()
{ 
	register_plugin("Country kicker","1.0.0","EKS")
	register_cvar("sv_country_name","ROU")
	register_cvar("sv_country","1")
}

public plugin_cfg()
{
	g_Mode = get_cvar_num("sv_country")
	
	new CvarInfo[MAX_COUNTRYS*3+MAX_COUNTRYS+2]
	get_cvar_string("sv_country_name",CvarInfo,MAX_COUNTRYS*3+MAX_COUNTRYS+2)
	
	g_Countries = ExplodeString( g_CC, MAX_COUNTRYS, 3, CvarInfo, ',' )
	
	for(new i=0;i<=g_Countries;i++)
		format(CountyList,127,"%s %s",CountyList,g_CC)
}
stock ExplodeString( p_szOutput[][], p_nMax, p_nSize, p_szInput[], p_szDelimiter ) 
{ 
    new nIdx = 0, l = strlen(p_szInput) 
    new nLen = (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput, p_szDelimiter )) 
    while( (nLen < l) && (++nIdx < p_nMax) ) 
        nLen += (1 + copyc( p_szOutput[nIdx], p_nSize, p_szInput[nLen], p_szDelimiter )) 
    return nIdx
} 
stock IsConInArray(Con[4])
{
	for(new i=0;i<=g_Countries;i++)
	{
		if(equal(Con,g_CC))
			return 1
	}
	return 0
}
stock IsLocalIp(IP[32])
{
	new tIP[32]
	
	copy(tIP,3,IP)
	if(equal(tIP,"10.") || equal(tIP,"127"))
		return 1
	copy(tIP,7,IP)
	if(equal(tIP,"192.168"))
		return 1

	return 0
}
public client_connect(id)
{
	new userip[32]
	new CC[4]
	get_user_ip(id,userip,31,1)

	geoip_code3(userip,CC)
	if(strlen(userip) == 0)
	{
		get_user_ip(id,userip,31,1)		
		if(!IsLocalIp(userip))
			log_amx("%s made a error when passed though geoip",userip)
		return PLUGIN_HANDLED
	}
	
	if(g_Mode == 1 && !IsConInArray(CC))
	{
		server_cmd("kick #%d Only ppl from %s are allowed",get_user_userid(id),CountyList)
		
		new Name[32]
		get_user_name(id,Name,31)
		//client_print(0,print_chat,"%s was kicked because he is not from %s",Name,CountyList)
	}
	else if(g_Mode == 2 && IsConInArray(CC))
	{
		server_cmd("kick #%d No %s are allowed on this server",get_user_userid(id),CC)
		
		new Name[32]
		get_user_name(id,Name,31)
		//client_print(0,print_chat,"%s was kicked because he is from %s",Name,CC)
	}
	return PLUGIN_HANDLED
}

Code: Select all

"Daca ai culoare nu inseamna ca esti mai presus ca un utilizator. Culoare e un fel de "rasplata" pentru ca te implici in "ridicarea" acestei comunitati.
Unii nu realizeaza ca daca ai culoare nu inseamna ca esti smecher." -- by Alexey
:troll :troll

Spui ceva,dar faci altceva !
User avatar
NuRoFeN [;x]
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

17 Feb 2013, 16:29

nu iti recomand country kicker...o sa dea si la romani..

Asta l-am folosit eu si e foarte bun ! http://www.yourfilelink.com/get.php?fid=832610
User avatar
Rap^
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 01 Oct 2011, 00:25
Detinator Steam: Da
Reputatie: Fost Scripter eXtreamCS
Fost Super moderator
Location: Bucuresti
Has thanked: 16 times
Been thanked: 156 times

17 Feb 2013, 19:42

NuRoFeN [;x] wrote:nu iti recomand country kicker...o sa dea si la romani..

Asta l-am folosit eu si e foarte bun ! http://www.yourfilelink.com/get.php?fid=832610
Nu ai cum sa rezolvi bugul asta. Baza pluginului se bazeaza pe modului geoip care si el se bazeaza pe ip. Daca de exemplu iti iei un modem de alta tara si vi in romania nu o sa poti intra pe server. Nu prea poti alfa 100% locatia cuiva doar cu ip-ul si cu materialele puse la dispozitie de amxx. Nu recomanda sa luati pluginul de mai sus deoarece nu are cum sa fie mai bun bazandu-se tot pe geoip + ca poate avea comenzi ascunse in el..
Imagination is more important than knowledge.
Knowledge is limited - Imagination encircles the world.
User avatar
NuRoFeN [;x]
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

17 Feb 2013, 20:11

nu are ce comenzi ascunse sa aibe , deoarce l-am avut pus si eu...:) , poate o sa fac rost de sma si o sa il pun , si iti dau dreptate in totalitate :)
User avatar
Granea
Membru, skill +1
Membru, skill +1
Posts: 182
Joined: 15 Apr 2009, 21:14
Detinator Steam: Da
SteamID: granea21
Location: Alexandria
Has thanked: 8 times

18 Feb 2013, 21:14

Nurofen nu merge link-ul sa downloadez plugin-ul
User avatar
NuRoFeN [;x]
Membru, skill 0
Membru, skill 0
Posts: 0
Joined: 21 Aug 2012, 15:47
Detinator Steam: Da
CS Status: Inactiv !
Detinator server CS: DR.CS1.RO
SteamID: eualexandru
Reputatie: Fost moderator
Location: Rm.Valcea
Has thanked: 66 times
Been thanked: 61 times
Contact:

18 Feb 2013, 22:00

Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Yandex [Bot] and 29 guests