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
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

12 Nov 2012, 21:41

Vreau si eu pluginu cand intra cinva pe server sa anunte in chat cu mesajul : "Jucatorul "lazlo1234" s-a conectat " culoarea verde Multumesc :d
RoyalServer 2
User avatar
xXxAdyxXx;x
Membru, skill +1
Membru, skill +1
Posts: 448
Joined: 23 Aug 2012, 15:44
Detinator Steam: Da
CS Status: Ma joc !
Detinator server CS: hNs.lunetisitii.ro
SteamID: it_allen90
Location: Suceava/Radauti
Has thanked: 18 times
Been thanked: 32 times
Contact:

13 Nov 2012, 08:54

Poftim | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <geoip>
#define MAXPLAYER 32

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

new TeamInfo;
new SayText;
new MaxSlots;

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

new bool:IsConnected[MAXPLAYER + 1];

new g_szSoundFile[] = "buttons/blip1.wav";

public plugin_init()
{
	register_plugin("Join notice color", "1.0", "kp_uparrow");

	register_cvar("amx_joinmsg", "1") //1=connected only,2=connecting + connected,3=connecting connected disconnected

	TeamInfo = get_user_msgid("TeamInfo");
	SayText = get_user_msgid("SayText");
	MaxSlots = get_maxplayers();
}
public plugin_precache()
{
	precache_sound(g_szSoundFile);
}
public client_putinserver(player)
{
	IsConnected[player] = true;
	if(get_cvar_num("amx_joinmsg") >= 1) {
	new authid[35],user[32],ip[32],Country[33]
	get_user_name(player,user,31)
	get_user_ip(player,ip,31,1)
	get_user_authid(player,authid,34)
	geoip_country(ip,Country)

	ColorChat(0, RED, "^x04%s ^x01(^x03%s^x01) (^x03%s^x01) a intrat (^x03%s^x01).",user,ip,authid,Country);
	client_cmd(0,"hud_saytext_time 8")
	client_cmd(0,"hud_deathnotice_time 8") //lol just my own remove if needed
	client_cmd(0, "spk %s", g_szSoundFile)
	}
}

public client_disconnect(player)
{
	if(get_cvar_num("amx_joinmsg") >= 3) {
	IsConnected[player] = false;
	new authid[35],user[32],ip[32],Country[33]
	get_user_name(player,user,31)
	get_user_ip(player,ip,31,1)
	get_user_authid(player,authid,34)
	geoip_country(ip,Country)

	ColorChat(0, RED, "^x04%s ^x01(^x03%s^x01) (^x03%s^x01) a iesit (^x03%s^x01).",user,ip,authid,Country);
	}
}
public client_authorized(player)
{
	IsConnected[player] = false;
	if(get_cvar_num("amx_joinmsg") >= 2) {
	new authid[35],user[32],ip[32],Country[33]
	get_user_name(player,user,31)
	get_user_ip(player,ip,31,1)
	get_user_authid(player,authid,34)
	geoip_country(ip,Country)

	ColorChat(0, RED, "^x04%s ^x01(^x03%s^x01) (^x03%s^x01) se conecteaza (^x03%s^x01).",user,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 GREY:
		{
			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;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1033\\ f0\\ fs16 \n\\ par }
*/
Image
User avatar
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

15 Nov 2012, 09:55

DAR EU NU VREAU SA II ARATE iP SI CELE... EU VREAU DOAR ASA SA SCRIE CU VERDE IN CHAT : Jucatorul lazlo1234 a intrat pe server
Last edited by SuNNNeR on 15 Nov 2012, 15:43, edited 1 time in total.
Reason: Fara bold
User avatar
Andrei.B
Fost administrator
Fost administrator
Posts: 6479
Joined: 17 Aug 2009, 09:15
Detinator Steam: Da
CS Status: Plecat pe mari si tari
Detinator server CS: Nu detin !
SteamID: andreybci94
Reputatie: Fost Membru Club eXtreamCS (o luna)
Fost Administrator
Nume anterior : bLack, Andrei,krusc
Contribuitor
Location: ConstanTa
Has thanked: 275 times
Been thanked: 557 times

15 Nov 2012, 17:01


Mereu in suflet culorile ( Roş -Albastru )
Image
ImageImage
User avatar
lazlo1234
Membru, skill +1
Membru, skill +1
Posts: 390
Joined: 10 Jul 2012, 00:08
Detinator Steam: Da
CS Status: MISCA MISCA DIN BURIC
Detinator server CS: DA
SteamID: nu am
Location: localhost
Has thanked: 114 times
Been thanked: 7 times
Contact:

15 Nov 2012, 22:26

nu am fost inteles :( Deci cand cine'va sa conectat pe server sa scrie in chat doar mesajul asta ! "Jucatorul cutare a intrat pe server" doar atat fara nimic in fata gen [AMXX] etc doar asta Jucatorul cutare a intrat pe server sa apara cu verde :)
User avatar
Fantasy1
Utilizator neserios (tepar)
Utilizator neserios (tepar)
Posts: 4836
Joined: 05 Jul 2012, 01:26
Detinator Steam: Da
Reputatie: Membru Club eXtreamCS (1 Mar)
Utilizator neserios (TEPAR!)
Has thanked: 278 times
Been thanked: 217 times
Contact:

28 Nov 2012, 11:06

Poftim.

Code: Select all

#include < amxmodx >

#define VERSIUNE "1.0"

public plugin_init()
{
   register_plugin("Connect", VERSIUNE, "CRISTIAN")
}

public client_putinserver(id)
{
   new name[32]
   get_user_name(id, name, 31)
   chat_color(0," !t%s !gS-a conectat pe server",name)
}

public client_disconnect(id)
{
   new name[32]
   get_user_name(id, name, 31)
   chat_color(0,"!t%s !gS-a Deconectat de pe server",name)
}
   
   
   
stock chat_color(const id, const input[], any:...)
{
   new count = 1, players[32]
   static msg[320]
   vformat(msg, 190, input, 3)
   replace_all(msg, 190, "!g", "^4")
   replace_all(msg, 190, "!n", "^1")
   replace_all(msg, 190, "!t", "^3")
   replace_all(msg, 190, "!t2", "^0")
   if (id) players[0] = id; else get_players(players, count, "ch")
   {
      for (new i = 0; i < count; i++)
      {
         if (is_user_connected(players[i]))
         {
            message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
            write_byte(players[i])
            write_string(msg)
            message_end()
         }
      }
   }
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\ rtf1\ ansi\ ansicpg1252\ deff0\ deflang1033{\ fonttbl{\ f0\ fnil Tahoma;}}n\ viewkind4\ uc1\ pard\ f0\ fs16 n\ par }
*/
CLICK AICI pentru FORUM
- Un Forum Care Nu Poate Fi Spart -
- Un Forum Care Nu Modifica Topicurile Cu Tepari -
- Vrei Indexare In Google? Posteaza Tzeparii La Noi -

- Daca ai nevoie sa te ajut cu un addons/plugin etc se plateste, nu ajut cu nimic pe GRATIS -
Post Reply

Return to “Cereri”

  • Information
  • Who is online

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