Cerere plugin Join

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
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 610
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 17 times

14 Nov 2013, 21:25

Sall all am nevoie si eu de un plugin de genul din poza modifict in care sa arate si orasul din care provine ,va multumesc anticipat :)

Image
RoyalServer 2
User avatar
Mădălin
Administrator
Administrator
Posts: 5295
Joined: 06 Mar 2013, 21:40
Detinator Steam: Nu
Reputatie: Administrator
Fost manager cs.extream.ro
Web designer
Administratorul anului 2023
Has thanked: 45 times
Been thanked: 310 times
Contact:

14 Nov 2013, 21:37

mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 610
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 17 times

14 Nov 2013, 22:00

scuzama ca n-am respectat sunt nou in comunitate
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 610
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 17 times

14 Nov 2013, 22:02

dar nu stiu la ce miai dat imi poti da sma ? modificat ca in poza :D
User avatar
-Turbo-
Membru, skill +4
Membru, skill +4
Posts: 1664
Joined: 11 Nov 2012, 01:28
Detinator Steam: Da
CS Status: Bored !
Detinator server CS: Da
SteamID: kingforbidden
Reputatie: Utilizator neserios ( tepar )
Restrictie moderator
Ban scos ( achitat )
Nume anterior: Turbo19973
Location: Botosani
Has thanked: 49 times
Been thanked: 212 times

14 Nov 2013, 22:35

Fix ca in poza | Afiseaza codul
#include <amxmodx>
#include <geoip>

#define PLUGIN  "Join Game"
#define VERSION "0.1"
#define AUTHOR "-Turbo-"

#define MAXPLAYER 32

enum Color
{
	YELLOW = 1, // Yellow
	GREEN, // Green Color
	TEAM_COLOR, // Red, grey, blue
	RED, // Red
	BLUE, // Blue
}

new bool:IsConnected[MAXPLAYER + 1];

new TeamInfo;
new SayText;
new MaxSlots;

new TERRORIST[] = "TERRORIST";
new CT[] = "CT";
new NOTHING[] = "";
new SPEC[] = "SPECTATOR";

public plugin_init()
{
        register_plugin("PLUGIN","VERSION","AUTHOR")

	TeamInfo = get_user_msgid("TeamInfo");
	SayText = get_user_msgid("SayText");
	MaxSlots = get_maxplayers();
}

public client_putinserver(id)
{

static ip[16],country[20],authid [31],name[32]
get_user_ip(id,ip,charsmax(ip),1)
get_user_authid(id,authid,34)
geoip_country(ip,country,charsmax(country))
get_user_name(id,name,charsmax(name))

ColorChat(0,GREEN, "^x01%s (^x04%s / ^x04%s/ ^x04%s) joined.",name,ip,authid,country);
}

public ColorChat(id, Color:type, const msg[], {Float,Sql,Result,_}:...)
{
	static message[256];

	switch(type)
	{
		case YELLOW: // Yellow
		{
			message[0] = 0x01;
		}
		case GREEN: // Green
		{
			message[0] = 0x04;
		}
		default: // White, Red, Blue
		{
			message[0] = 0x03;
		}
	}

	vformat(message[1], 251, msg, 4);

	// Make sure message is not longer than 192 character. Will crash the server.
	message[192] = '^0';

	new team, did;

	if(id && IsConnected[id])
	{
		team = get_user_team(id);

		did = color_selection(id, type);
		show_message(id, id, MSG_ONE, message);

		if(did)
		{
			TeamSelection(id, team);
		}
	} else {
		new index = FindPlayer();

		if(index != -1)
		{
			team = get_user_team(index);

			did = color_selection(index, type);
			show_message(index, 0, MSG_ALL, message);

			if(did)
			{
				TeamSelection(index, team);
			}
		}
	}
}

show_message(id, index, type, message[])
{
	message_begin(type, SayText, {0, 0, 0}, index);
	write_byte(id);
	write_string(message);
	message_end();
}

Team_Info(id, team[])
{
	message_begin(MSG_ALL, TeamInfo);
	write_byte(id);
	write_string(team);
	message_end();

	return 1;
}

color_selection(index, Color:Type)
{
	switch(Type)
	{
		case RED:
		{
			return Team_Info(index, TERRORIST);
		}
		case BLUE:
		{
			return Team_Info(index, CT);
		}
		case GREEN:
		{
			return Team_Info(index, NOTHING);
		}
	}

	return 0;
}

TeamSelection(index, team)
{
	switch(team)
	{
		case 0:
		{
			Team_Info(index, NOTHING);
		}
		case 1:
		{
			Team_Info(index, TERRORIST);
		}
		case 2:
		{
			Team_Info(index, CT);
		}
		case 3:
		{
			Team_Info(index, SPEC);
		}
	}
}

FindPlayer()
{
	new i = -1;

	while(i <= MaxSlots)
	{
		if(IsConnected[++i])
		{
			return i;
		}
	}

	return -1;
}
mr.f3lyx
Membru, skill +2
Membru, skill +2
Posts: 610
Joined: 10 Nov 2013, 20:24
Detinator Steam: Da
Location: Palermo, Italy
Has thanked: 69 times
Been thanked: 17 times

14 Nov 2013, 22:56

ciudat l-am luat l-am compilat dar tot nu merge ? am facut eu ceva gresit ?
User avatar
-Turbo-
Membru, skill +4
Membru, skill +4
Posts: 1664
Joined: 11 Nov 2012, 01:28
Detinator Steam: Da
CS Status: Bored !
Detinator server CS: Da
SteamID: kingforbidden
Reputatie: Utilizator neserios ( tepar )
Restrictie moderator
Ban scos ( achitat )
Nume anterior: Turbo19973
Location: Botosani
Has thanked: 49 times
Been thanked: 212 times

14 Nov 2013, 23:24

nu ai geoip-ul activat :)

intra in modules.ini si adauga geoip daca il ai cu ";" in fata stergele, dai rr la server si o sa mearga !
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 31 guests