Zarejestruj się Użytkownicy Kalendarz Zaznacz Wszystkie Fora jako Przeczytane CS FAQ Regulamin forum =w= Tani STEAM

Wróć   Forum Counter Strike > Serwer HLDS - wszytko o własnym serwerze do Counter Strike 1.6 Steam i Non Steam > Pluginy, dodatki, AMX, AMXX

Pluginy, dodatki, AMX, AMXX Tutaj piszemy o dodatkach do serwerach, pluginach, modach, AMX i AMXX

Pluginy i pytania

- Tagi: ,

Odpowiedz
 
LinkBack Narzędzia wątku

Pluginy i pytania

  stare
Lodokor is Offline
Starsza lamka
 
Postów: 88

Poziom upalenia:
-------- Doświadczenie: abstynent
Zarejestrowany: Jan 2008
   

1.Jak zmienic JPEG na mdl przez program Half-Life Model Viewer???
2.Macie plugin loadingsound dzialajacy w 100% ??? Jesli tak to prosze o podanie linka
3.Prosze o przerobienie pluginu z tego dzialu o nazwie: Zielony kolor nicka tak zeby bylo ze jak admin napisze do admina w chacie to zeby tak sie wyswietlalo:
(Admin)Nick admina: Siema
LINK
Cytat:
//************************************************** *************
//* Standard Admin Color Chat v. 1.1.1 for AMXX *
//* by Martin J. Van der Cal *
//* *
//* Standard admin chat in color *
//* *
//* Copyright (C) 2005, Martin J. Van der Cal *
//* This plugin is under the GNU General Public License, read *
//* "Std Admin Color Chat Readme.doc" for further information. *
//* *
//* std_admin_color_chat.sma *
//* *
//************************************************** *************

#include <amxmodx>

#define MAX_MESSAGE_SIZE 256
#define MAX_COMMAND_SIZE 10
#define AMX_CHAT_CHAR_RECOGNITION '@' // What character we look for when we decide if the message should go to the admins
#define AMX_PSAY_CHAR_RECOGNITION '#' // Character to look for when sending PMs

// Error Codes
#define TOO_MANY_MATCHED -1
#define NONE_MATCHED -2

#define AMX_PSAY_FINDNICK_ERROR_TOO_MANY "^x04[ACC] says: Error <Too many found>"
#define AMX_PSAY_FINDNICK_ERROR_NONE "^x04[ACC] says: Error <None found>"
#define AMX_PSAY_FINDNICK_ERROR_UNKNOWN "^x04[ACC] says: Error <Unknown error>"

// Text defines, PREFIX is text before and SUFFIX is text after the username in a message.
// Feel free to change these. Also note that ^x01 and ^x04 is color codes.
#define AMX_CHAT_PREFIX "^x04" // Text before the username in amx_chat command
#define AMX_CHAT_SUFFIX " tells admins: " // Text after the username in amx_chat command
#define AMX_PSAY_SEND_PREFIX "^x04" // Text before the username in a PM that you send
#define AMX_PSAY_SEND_SUFFIX " PMs you: ^x01" // Text after the username in a PM that you send
#define AMX_PSAY_BACK_TO_SENDER_PREFIX "^x04You PM " // Text before the username in the confimation notice of the PM you send
#define AMX_PSAY_BACK_TO_SENDER_SUFFIX ": ^x01" // Text after the username in the confimation notice of the PM you send
#define AMX_SAY_PREFIX "^x04" // Text before the username in the amx_say command
#define AMX_SAY_SUFFIX " tells all: ^x01" // Text after the username in the amx_say command
// E. g. an amx_chat message with the current settings will be as following example shows
// Command by player with the nick "Martin Van der Cal":
// amx_chat Hello admins
// Shows as:
// Martin Van der Cal tells admins: Hello admins
// Also note that with only the color code in the prefix the whole line will show as green to all admins


new gmsgSayText

public plugin_init()
{
register_plugin("Std Admin Color Chat", "1.1.1", "Van der Cal")

register_clcmd("say", "SayHandler", ADMIN_CHAT, "# <name or #userid> <message> - Sends a PM")
register_clcmd("say_team", "SayTeamHandler", 0, "@ <message> - Displays message to admins")

register_concmd("amx_say", "ConCmdACCSay", ADMIN_CHAT, "<message> - Displays message to all players")
register_concmd("amx_psay", "ConCmdACCPM", ADMIN_CHAT, "# <name or #userid> <message> - Sends a PM");
register_concmd("amx_chat", "ConCmdACCAdmins", ADMIN_CHAT, "<message> - Displays message to admins");

gmsgSayText = get_user_msgid("SayText")
}

// Runs if anything is said in say
public SayHandler(iPlayerID)
{
new sTemp[MAX_MESSAGE_SIZE]
new sMessage[MAX_MESSAGE_SIZE]
new sCmd[MAX_COMMAND_SIZE]
read_argv(1, sTemp, MAX_MESSAGE_SIZE - 1)

// if the player has admin chat rights
if ( get_user_flags(iPlayerID) & ADMIN_CHAT )
{
// if the chat starts with AMX_PSAY_CHAR_RECOGNITION. That is, if an admin wants to send a PM
if ( sTemp[0] == AMX_PSAY_CHAR_RECOGNITION )
{
// server_print("[DEBUG] ")

if (sTemp[1] == ' ')
{
// Remove the chat recognition chars
strbreak(sTemp, sCmd, MAX_COMMAND_SIZE-1, sMessage, MAX_MESSAGE_SIZE-1)
}
else
{
// Remove the chat recognition chars without the space
sTemp[0] = ' '
trim(sTemp)
copy(sMessage, MAX_MESSAGE_SIZE-1, sTemp)
}

// Now we have our nick and message only in sMessage and thus, time for the next stage
BaseSendPM(sMessage, iPlayerID)

return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}

// Runs if anything is said in team_say
public SayTeamHandler(iPlayerID)
{
new sTemp[MAX_MESSAGE_SIZE]
new sCmd[MAX_COMMAND_SIZE]
new sMessage[MAX_MESSAGE_SIZE]
read_argv(1, sTemp, MAX_MESSAGE_SIZE - 1)

// if the chat starts with AMX_CHAT_CHAR_RECOGNITION then we are supposed to send it to all admins
if ( sTemp[0] == AMX_CHAT_CHAR_RECOGNITION )
{
// Somehow I cant get trim to work as I want, so if there are a space after @, then I had to resort to using strbreak
if (sTemp[1] == ' ')
{
// Remove the chat recognition chars, sMessage will contain the message and the message only
strbreak(sTemp, sCmd, MAX_COMMAND_SIZE-1, sMessage, MAX_MESSAGE_SIZE-1)
}
else
{
// Remove the chat recognition chars without the space.
sTemp[0] = ' '
trim(sTemp)
copy(sMessage, MAX_MESSAGE_SIZE-1, sTemp)
}

remove_quotes(sMessage)

SendAdminMessage(sMessage, iPlayerID)

return PLUGIN_HANDLED
}
else if ( get_user_flags(iPlayerID) & ADMIN_CHAT )
{
// if the chat starts with AMX_PSAY_CHAR_RECOGNITION. That is, if an admin wants to send a PM
if ( sTemp[0] == AMX_PSAY_CHAR_RECOGNITION )
{
if (sTemp[1] == ' ')
{
// Remove the chat recognition chars
strbreak(sTemp, sCmd, MAX_COMMAND_SIZE-1, sMessage, MAX_MESSAGE_SIZE-1)
}
else
{
// Remove the chat recognition chars without the space
sTemp[0] = ' '
trim(sTemp)
copy(sMessage, MAX_MESSAGE_SIZE-1, sTemp)
}

BaseSendPM(sMessage, iPlayerID)

return PLUGIN_HANDLED
}
}
return PLUGIN_CONTINUE
}

// Console command, amx_say <message>
public ConCmdACCSay(iPlayerID)
{
// if the user is an admin with ADMIN_CHAT flag
if ( get_user_flags(iPlayerID) & ADMIN_CHAT )
{
new sMessage[MAX_MESSAGE_SIZE]
read_args(sMessage, MAX_MESSAGE_SIZE-1)
remove_quotes(sMessage)

new sUser[MAX_MESSAGE_SIZE]
get_user_name(iPlayerID, sUser, MAX_MESSAGE_SIZE-1)

// The message that we will actually send
new sRealMessage[MAX_MESSAGE_SIZE] = AMX_SAY_PREFIX
add(sRealMessage, MAX_MESSAGE_SIZE-1, sUser)
add(sRealMessage, MAX_MESSAGE_SIZE-1, AMX_SAY_SUFFIX)
add(sRealMessage, MAX_MESSAGE_SIZE-1, sMessage, MAX_MESSAGE_SIZE-strlen(sRealMessage)-1)

// Get the steamid for the sake of logging
new sSendSteamID[MAX_MESSAGE_SIZE]
get_user_authid(iPlayerID, sSendSteamID, MAX_MESSAGE_SIZE-1)

// Get all current players
new nCurPlayers
new iArrCurPlayers[32]
get_players(iArrCurPlayers, nCurPlayers, "c")

// Log the message
log_amx("Chat (ALL), From: ^"%s<%d><%s><>^" Message: ^"%s^"", sUser, iPlayerID, sSendSteamID, sMessage)
log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")",sUser, iPlayerID, sSendSteamID, sMessage)

// For every player
for (new iID = 0; iID < nCurPlayers; iID++)
SendMessage(sRealMessage, iArrCurPlayers[iID]) // Send the message to the player
}
return PLUGIN_HANDLED;
}

// Console command, amx_psay <nick or steamid> <message>
public ConCmdACCPM(iPlayerID)
{
// if the user is an admin
if ( get_user_flags(iPlayerID) & ADMIN_CHAT )
{
new sArgs[MAX_MESSAGE_SIZE]
read_args(sArgs, MAX_MESSAGE_SIZE-1)

BaseSendPM(sArgs, iPlayerID)
}
return PLUGIN_HANDLED
}

// Console Command, amx_chat <message>
public ConCmdACCAdmins(iPlayerID)
{
new sArgs[MAX_MESSAGE_SIZE]
read_args(sArgs, MAX_MESSAGE_SIZE-1)
remove_quotes(sArgs)

SendAdminMessage(sArgs, iPlayerID)

return PLUGIN_HANDLED
}

// Returns the id of the player, IF and only IF it found ONLY one player with which contains the nick provided, otherwise it returns less than 0
FindPlayerWithNick(sNick[MAX_MESSAGE_SIZE])
{
new iArrPlayers[32]
new nPlayers
new sUser[MAX_MESSAGE_SIZE]
new iPlayerID = -100
get_players(iArrPlayers, nPlayers, "c")

// for every player
for (new iID = 0; iID < nPlayers; iID++)
{
get_user_name(iArrPlayers[iID], sUser, MAX_MESSAGE_SIZE-1)

// Check if their nick contains the nick part provided, ignore caps
if ( containi(sUser, sNick) >= 0 || equali(sUser,sNick) )
{
// if we havent found anyone yet, else return we have found too many
if (iPlayerID == -100)
iPlayerID = iArrPlayers[iID]
else
return TOO_MANY_MATCHED
}
}
if (iPlayerID == -100)
return NONE_MATCHED
else
return iPlayerID

return 0
}

// Returns the id of the player with the correct steamid if it find any, otherwise it returns less than 0
FindPlayerWithSteamID(sSteamID[MAX_MESSAGE_SIZE])
{
new iArrPlayers[32]
new nPlayers
new sUser[MAX_MESSAGE_SIZE]
new iResult
get_players(iArrPlayers, nPlayers, "c")

for (new iID = 0; iID < nPlayers; iID++)
{
get_user_authid(iArrPlayers[iID], sUser, MAX_MESSAGE_SIZE-1)
// The steam id must be strictly equal
iResult = equal(sUser, sSteamID)
if ( iResult == 1 )
{
// Since steamid is unique, we dont have to check anyone else
return iArrPlayers[iID]
}
}
return NONE_MATCHED
}

// This is where we build the message to be sent, logs the message and find out who the admins are
SendAdminMessage(sMessage[], iSenderID)
{
// The message that is going to be sent. ^x04 is green color
new sRealMessage[MAX_MESSAGE_SIZE] = AMX_CHAT_PREFIX

// Get the username of the sender
new sUser[MAX_MESSAGE_SIZE]
get_user_name(iSenderID, sUser, MAX_MESSAGE_SIZE - 1)

// Add user, "user friendly text" and the message to the message we are going to send
add(sRealMessage, MAX_MESSAGE_SIZE, sUser)
add(sRealMessage, MAX_MESSAGE_SIZE, AMX_CHAT_SUFFIX)
add( sRealMessage, MAX_MESSAGE_SIZE, (sMessage), (MAX_MESSAGE_SIZE-strlen(sRealMessage)-1) )

// Get the steamid for the sake of logging
new sSendSteamID[MAX_MESSAGE_SIZE]
get_user_authid(iSenderID, sSendSteamID, MAX_MESSAGE_SIZE-1)

// Get all current players
new nCurPlayers
new iArrCurPlayers[32]
get_players(iArrCurPlayers, nCurPlayers, "c")

// Log the message
log_amx("ADMINS amx_chat, From: ^"%s<%d><%s><>^" Message: ^"%s^"", sUser, iSenderID, sSendSteamID, sMessage)
log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")",sUser, iSenderID, sSendSteamID, sMessage)

// For every player
for (new iID = 0; iID < nCurPlayers; iID++)
if ( get_user_flags(iArrCurPlayers[iID]) & ADMIN_CHAT ) // If the player is an admin
SendMessage(sRealMessage, iArrCurPlayers[iID]) // Send the message to the player(admin)
}

// This is where we prepare the PM, breaks out the nick and the message from the original message,
// finds who the reciever is and sends it. Also sends error if none or several matches found
BaseSendPM(sArgs[], iPlayerID)
{
new sNick[MAX_MESSAGE_SIZE]
new sMessage[MAX_MESSAGE_SIZE]

// Get the nick/steamid
strbreak(sArgs, sNick, MAX_MESSAGE_SIZE-1, sMessage, MAX_MESSAGE_SIZE-1)

// Remove all those nasty quotes ! ! !
remove_quotes(sNick)
replace(sMessage, MAX_MESSAGE_SIZE-1, "^"", "")

// Get the players id by comparing the players nick with the one the user supplied
new iResult
if ( equal(sNick, "STEAM_", 6) )
iResult = FindPlayerWithSteamID(sNick)
else
iResult = FindPlayerWithNick(sNick)

if ( iResult >= 0 ) // if we found "ONE" player with that nick, then we send the PM
{
SendPM(sMessage, iPlayerID, iResult)
}
else // if we found none or several with that nick. Then we send back an error message to the admin
{
new sSendSteamID[MAX_MESSAGE_SIZE]
get_user_authid(iPlayerID, sSendSteamID, MAX_MESSAGE_SIZE-1)

if ( iResult == TOO_MANY_MATCHED )
format(sMessage, MAX_MESSAGE_SIZE-1, AMX_PSAY_FINDNICK_ERROR_TOO_MANY)
else if ( iResult == NONE_MATCHED )
format(sMessage, MAX_MESSAGE_SIZE-1, AMX_PSAY_FINDNICK_ERROR_NONE)
else
format(sMessage, MAX_MESSAGE_SIZE-1, AMX_PSAY_FINDNICK_ERROR_UNKNOWN)

// if the sender is an admin or infact the server itself.
if ( equal(sSendSteamID, "STEAM_", 6) )
SendMessage(sMessage, iPlayerID)
else
server_print(sMessage)
}
}

// Here we build the PM message, logs it and sends it
SendPM(sMessage[], iSenderID, iRecieverID)
{
new sRealMessage[MAX_MESSAGE_SIZE] = AMX_PSAY_SEND_PREFIX

// To the person
new sUser[MAX_MESSAGE_SIZE]
get_user_name(iSenderID, sUser, MAX_MESSAGE_SIZE - 1)

add(sRealMessage, MAX_MESSAGE_SIZE-1, sUser)
add(sRealMessage, MAX_MESSAGE_SIZE-1, AMX_PSAY_SEND_SUFFIX)
add(sRealMessage, MAX_MESSAGE_SIZE-1, sMessage, MAX_MESSAGE_SIZE-strlen(sRealMessage)-1)

new sRecvSteamID[MAX_MESSAGE_SIZE]
new sSendSteamID[MAX_MESSAGE_SIZE]
new sRecvName[MAX_MESSAGE_SIZE]

get_user_authid(iSenderID, sSendSteamID, MAX_MESSAGE_SIZE-1)
get_user_authid(iRecieverID, sRecvSteamID, MAX_MESSAGE_SIZE-1)

get_user_name(iRecieverID, sRecvName, MAX_MESSAGE_SIZE - 1)

log_amx("PM From: ^"%s<%d><%s><>^" To: ^"%s<%d><%s><>^" Message: ^"%s^"", sUser, iSenderID, sSendSteamID, sRecvName, iRecieverID, sRecvSteamID, sMessage)
log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")",
sUser, iSenderID, sSendSteamID, sRecvName, iRecieverID, sRecvSteamID, sMessage)

SendMessage(sRealMessage, iRecieverID)

// And to the admin who sent it
new sToAdmin[MAX_MESSAGE_SIZE] = AMX_PSAY_BACK_TO_SENDER_PREFIX
add(sToAdmin, MAX_MESSAGE_SIZE-1, sRecvName)
add(sToAdmin, MAX_MESSAGE_SIZE-1, AMX_PSAY_BACK_TO_SENDER_SUFFIX)
add(sToAdmin, MAX_MESSAGE_SIZE-1, sMessage, MAX_MESSAGE_SIZE-strlen(sToAdmin)-1)

// if the sender is an admin or infact the server
if ( equal(sSendSteamID, "STEAM_", 6) )
SendMessage(sToAdmin, iSenderID)
else
server_print(sToAdmin)
}

// General method for sending chat messages, params are the message to be sent and the id of the player who should get it
SendMessage(sMessage[], iRecieverID)
{
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, iRecieverID)
write_byte(iRecieverID)
write_string(sMessage)
message_end()
}

  
  stare
Peter is Offline
Spamer
 
Postów: 158

Poziom upalenia:
-------- Doświadczenie: abstynent
Zarejestrowany: Jan 2008
   

2. http://forums.alliedmods.net/showthread.php?p=447122
http://forums.alliedmods.net/showthread.php?p=397159
http://forums.alliedmods.net/showthread.php?p=367152
  
  stare
seba is Offline
Super Moderator
 
Avatar seba
 
Postów: 10,587

Poziom upalenia:
XXXXX--- Doświadczenie: pali wiadra
Zarejestrowany: Jun 2007
Wiek: 1
  Wyślij wiadomośc poprzez AIM do seba  

Cytat:
Napisał Lodokor
1.Jak zmienic JPEG na mdl przez program Half-Life Model Viewer???
jpg nie da się zamienić na mdl


Wiesz że kocham jarać ? Kliknij na i pozwól mi zapalić. Mój nick steam: pawelmroz
Go 84.38.95.197:27020 and play prO!


Nie pomagam na PW! Za każde pytanie dostaniesz warna.
  

qqq

  stare
Lodokor is Offline
Starsza lamka
 
Postów: 88

Poziom upalenia:
-------- Doświadczenie: abstynent
Zarejestrowany: Jan 2008
   

a przerobicie mi tamten plugin nr 3 ???
1.To jaki format moze przerobic przez tamten program na mdl i jak przerobic ???
  
  stare
LaQ! is Offline
Starsza lamka
 
Postów: 48

Poziom upalenia:
-------- Doświadczenie: abstynent
Zarejestrowany: Mar 2008
  Wyślij wiadomośc poprzez AIM do LaQ!  

A co za to dasz?
_____________________


  

zzzz

  stare
Lodokor is Offline
Starsza lamka
 
Postów: 88

Poziom upalenia:
-------- Doświadczenie: abstynent
Zarejestrowany: Jan 2008
   

Dam pomogl
  
  stare
Baroo is Online
Super Moderator
 
Avatar Baroo
 
Postów: 1,689

Poziom upalenia:
X------- Doświadczenie: palił z lufki
Zarejestrowany: Nov 2007
  Wyślij wiadomośc poprzez AIM do Baroo Wyślij wiadomość poprzez Skype™ do Baroo  

Cytat:
Napisał LaQ!
A co za to dasz?
A wiesz za dopominanie się jest +w ?


Ole ! Kalisz Kocham Cię ! Tobie dałem serce swe , serce swoje jedyne ! Dałem swojej drużynie !
  
  stare
JaCo is Online
Super Moderator
 
Avatar JaCo
 
Postów: 3,027

Poziom upalenia:
XXX----- Doświadczenie: pali bongi
Zarejestrowany: Jul 2007
Wiek: 16
   

Lodokor, 3maj trzeci

tak to ma wyglądać

Cytat:
; Chat / Messages
;;;adminchat.amxx ; console chat commands
adminchatgreen.amxx ; console chat commands with colors
antiflood.amxx ; prevent clients from chat-flooding the server
scrollmsg.amxx ; displays a scrolling message
imessage.amxx ; displays information messages
adminvote.amxx ; vote commands



Kod:
/* AMX Mod X
*   Admin Chat Plugin
*
* by the AMX Mod X Development Team
*  originally developed by OLO
*
* This file is part of AMX Mod X.
*
*
*  This program is free software; you can redistribute it and/or modify it
*  under the terms of the GNU General Public License as published by the
*  Free Software Foundation; either version 2 of the License, or (at
*  your option) any later version.
*
*  This program is distributed in the hope that it will be useful, but
*  WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*  General Public License for more details.
*
*  You should have received a copy of the GNU General Public License
*  along with this program; if not, write to the Free Software Foundation,
*  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*  In addition, as a special exception, the author gives permission to
*  link the code of this program with the Half-Life Game Engine ("HL
*  Engine") and Modified Game Libraries ("MODs") developed by Valve,
*  L.L.C ("Valve"). You must obey the GNU General Public License in all
*  respects for all of the code used other than the HL Engine and MODs
*  from Valve. If you modify this file, you may extend this exception
*  to your version of the file, but you are not obligated to do so. If
*  you do not wish to do so, delete this exception statement from your
*  version.
*/

#include <amxmodx>
#include <amxmisc>

new g_msgChannel

#define MAX_CLR 10

new g_Colors[MAX_CLR][] = {"COL_WHITE", "COL_RED", "COL_GREEN", "COL_BLUE", "COL_YELLOW", "COL_MAGENTA", "COL_CYAN", "COL_ORANGE", "COL_OCEAN", "COL_MAROON"}
new g_Values[MAX_CLR][] = {{255, 255, 255}, {255, 0, 0}, {0, 255, 0}, {0, 0, 255}, {255, 255, 0}, {255, 0, 255}, {0, 255, 255}, {227, 96, 8}, {45, 89, 116}, {103, 44, 38}}
new Float:g_Pos[4][] = {{0.0, 0.0}, {0.05, 0.55}, {-1.0, 0.2}, {-1.0, 0.7}}

new amx_show_activity, amx_namegreen;

new g_msgSayText

public plugin_init()
{
	register_plugin("Admin Chat", AMXX_VERSION_STR, "AMXX Dev Team")
	register_dictionary("adminchatgreen.txt")
	register_dictionary("common.txt")
	register_clcmd("say", "cmdSayChat", ADMIN_CHAT, "@[@|@|@][w|r|g|b|y|m|c]<text> - displays hud message")
	register_clcmd("say_team", "cmdSayAdmin", 0, "@<text> - displays message to admins")
	register_concmd("amx_say", "cmdSay", ADMIN_CHAT, "<message> - sends message to all players")
	register_concmd("amx_chat", "cmdChat", ADMIN_CHAT, "<message> - sends message to admins")
	register_concmd("amx_psay", "cmdPsay", ADMIN_CHAT, "<name or #userid> <message> - sends private message")
	register_concmd("amx_tsay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends left side hud message to all players")
	register_concmd("amx_csay", "cmdTsay", ADMIN_CHAT, "<color> <message> - sends center hud message to all players")
	
	amx_show_activity = get_cvar_pointer("amx_show_activity");
	
	if (amx_show_activity == 0)
	{
		amx_show_activity = register_cvar("amx_show_activity", "2");
	}
	
	amx_namegreen = register_cvar("amx_namegreen", "0");
	g_msgSayText = get_user_msgid("SayText");
}

public cmdSayChat(id)
{
	if (!access(id, ADMIN_CHAT))
	{
		return PLUGIN_CONTINUE
	}
	
	new said[6], i = 0
	read_argv(1, said, 5)
	
	while (said[i] == '@')
	{
		i++
	}

	new message[192], name[32]
	read_args(message, 191)
	get_user_name(id, name, 31)
	remove_quotes(message)
	if (!i || i > 3)
	{
		if(!(get_pcvar_num(amx_namegreen)) ) return PLUGIN_CONTINUE
		new players[32], inum, player
		get_players(players, inum)
		if(is_user_alive(id))
			format(message, 191, "^4%s ^3:  ^1%s", name, message)
		else
			format(message, 191, "^1*DEAD* ^4%s ^3:  ^1%s", name, message)
		for(new j = 0; j < inum; ++j) {
			player = players[j]
			col_mess(player, id, message)
		}
		return PLUGIN_HANDLED_MAIN
	}

	new a = 0
	switch (said[i])
	{
		case 'r': a = 1
		case 'g': a = 2
		case 'b': a = 3
		case 'y': a = 4
		case 'm': a = 5
		case 'c': a = 6
		case 'o': a = 7
	}
	
	new n, s = i
	if (a)
	{
		n++
		s++
	}
	while (said[s] && isspace(said[s]))
	{
		n++
		s++
	}
	

	new authid[32], userid
	
	get_user_authid(id, authid, 31)
	userid = get_user_userid(id)
	
	log_amx("Chat: ^"%s<%d><%s><>^" tsay ^"%s^"", name, userid, authid, message[i + n])
	log_message("^"%s<%d><%s><>^" triggered ^"amx_tsay^" (text ^"%s^") (color ^"%L^")", name, userid, authid, message[i + n], "en", g_Colors[a])
	
	if (++g_msgChannel > 6 || g_msgChannel < 3)
	{
		g_msgChannel = 3
	}
	
	new Float:verpos = g_Pos[i][1] + float(g_msgChannel) / 35.0
	
	set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], g_Pos[i][0], verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

	switch ( get_pcvar_num(amx_show_activity) )
	{
		case 3, 4:
		{
			new maxpl = get_maxplayers();
			for (new pl = 1; pl <= maxpl; pl++)
			{
				if (is_user_connected(pl) && !is_user_bot(pl))
				{
					if (is_user_admin(pl))
					{
						show_hudmessage(pl, "%s :   %s", name, message[i + n])
						client_print(pl, print_notify, "%s :   %s", name, message[i + n])
					}
					else
					{
						show_hudmessage(pl, "%s", message[i + n])
						client_print(pl, print_notify, "%s", message[i + n])
					}
				}
			}
		}
		case 2:
		{
			show_hudmessage(0, "%s :   %s", name, message[i + n])
			client_print(0, print_notify, "%s :   %s", name, message[i + n])
		}
		default:
		{
			show_hudmessage(0, "%s", message[i + n])
			client_print(0, print_notify, "%s", message[i + n])
		}
	}
	if(a==1) {
		client_cmd(0, "spk ^"vox/warning _comma message from administration^"")
	}

	return PLUGIN_HANDLED
}

public cmdSayAdmin(id)
{
	new said[2]
	read_argv(1, said, 1)
	
	if (said[0] != '@')
		return PLUGIN_CONTINUE
	
	new message[192], name[32], authid[32], userid
	new players[32], inum, player
	
	read_args(message, 191)
	remove_quotes(message)
	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	userid = get_user_userid(id)
	
	log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message[1])
	log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message[1])
	
	if (is_user_admin(id))
		format(message, 191, "^4(%L) ^3%s ^4:  ^1%s", id, "ADMIN", name, message[1])
	else
		format(message, 191, "^4(%L) ^3%s ^4:  ^1%s", id, "PLAYER", name, message[1])

	get_players(players, inum)
	
	for (new i = 0; i < inum; ++i)
	{
		player = players[i]
		if (get_user_flags(player) & ADMIN_CHAT || player == id)
		{
			col_mess(player, id, message)
		}
	}	
	return PLUGIN_HANDLED
}

public cmdChat(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new message[192], name[32], players[32], inum, authid[32], userid, player
	
	read_args(message, 191)
	remove_quotes(message)
	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	userid = get_user_userid(id)
	get_players(players, inum)
	
	log_amx("Chat: ^"%s<%d><%s><>^" chat ^"%s^"", name, userid, authid, message)
	log_message("^"%s<%d><%s><>^" triggered ^"amx_chat^" (text ^"%s^")", name, userid, authid, message)
	
	format(message, 191, "^4(ADMINS) ^3%s ^4:  ^1%s", name, message)
	console_print(id, "%s", message)
	
	for (new i = 0; i < inum; ++i)
	{
		player = players[i]
		if (access(players[i], ADMIN_CHAT))
		{
			col_mess(player, id, message)
		}
	}
	return PLUGIN_HANDLED
}

public cmdSay(id, level, cid)
{
	if (!cmd_access(id, level, cid, 2))
		return PLUGIN_HANDLED

	new message[192], name[32], authid[32], userid
	
	read_args(message, 191)
	remove_quotes(message)
	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	userid = get_user_userid(id)

	console_print(id, "%L", id, "PRINT_ALL", name, message)

	log_amx("Chat: ^"%s<%d><%s><>^" say ^"%s^"", name, userid, authid, message)
	log_message("^"%s<%d><%s><>^" triggered ^"amx_say^" (text ^"%s^")", name, userid, authid, message)

	new colored[192]
	

	new players[32], inum, player
	get_players(players, inum)

	for (new i = 0; i < inum; i++)
	{
		player = players[i]
		switch(get_pcvar_num(amx_show_activity))
		{
			case 3, 4:
			{
				if(is_user_admin(player)){
					formatex(colored,191,"^1(%L) ^4 ADMIN ^3%s ^1:  %s", player, "ALL", name, message)
				}else{
					formatex(colored,191,"^1(%L) ^4 ADMIN ^1:  %s", player, "ALL", message)
				}
			}
			case 2:formatex(colored,191,"^1(%L) ^4 ADMIN ^3%s ^1:  %s", player, "ALL", name, message)
			default :formatex(colored,191,"^1(%L) ^4 ADMIN ^1:  %s", player, "ALL", message)
		}
		col_mess(player, id, colored)
	}
	return PLUGIN_HANDLED
}

public cmdPsay(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED
	
	new name[32]
	read_argv(1, name, 31)
	new priv = cmd_target(id, name, 0)

	if (!priv)
		return PLUGIN_HANDLED
	
	new length = strlen(name) + 1

	get_user_name(priv, name, 31); 
	
	new message[192], name2[32], authid[32], authid2[32], userid, userid2
	
	get_user_authid(id, authid, 31)
	get_user_name(id, name2, 31)
	userid = get_user_userid(id)
	read_args(message, 191)
	
	if (message[0] == '"' && message[length] == '"') // HLSW fix
	{
		message[0] = ' '
		message[length] = ' '
		length += 2
	}
	
	remove_quotes(message[length])
	get_user_name(priv, name, 31)
	new colored[192]
	formatex(colored,191,"^1(^4%s^1) ^4%s ^1:  %s", name, name2, message[length])
	if (id && id != priv)
	{
		col_mess(id, id, colored)
	}
	col_mess(priv, id, colored)

	console_print(id, "(%s) %s :   %s", name, name2, message[length])
	get_user_authid(priv, authid2, 31)
	userid2 = get_user_userid(priv)
	
	log_amx("Chat: ^"%s<%d><%s><>^" psay ^"%s<%d><%s><>^" ^"%s^"", name2, userid, authid, name, userid2, authid2, message[length])
	log_message("^"%s<%d><%s><>^" triggered ^"amx_psay^" against ^"%s<%d><%s><>^" (text ^"%s^")", name2, userid, authid, name, userid2, authid2, message[length])
	
	return PLUGIN_HANDLED
}

public cmdTsay(id, level, cid)
{
	if (!cmd_access(id, level, cid, 3))
		return PLUGIN_HANDLED
	
	new cmd[16], color[16], color2[16], message[192], name[32], authid[32], userid = 0
	
	read_argv(0, cmd, 15)
	new bool:tsay = (tolower(cmd[4]) == 't')
	
	read_args(message, 191)
	remove_quotes(message)
	parse(message, color, 15)
	
	new found = 0, a = 0
	new lang[3], langnum = get_langsnum()

	for (new i = 0; i < MAX_CLR; ++i)
	{
		for (new j = 0; j < langnum; j++)
		{
			get_lang(j, lang)
			format(color2, 15, "%L", lang, g_Colors[i])
			
			if (equali(color, color2))
			{
				a = i
				found = 1
				break
			}
		}
		if (found == 1)
			break
	}
	
	new length = found ? (strlen(color) + 1) : 0
	
	if (++g_msgChannel > 6 || g_msgChannel < 3)
		g_msgChannel = 3

	new Float:verpos = (tsay ? 0.55 : 0.1) + float(g_msgChannel) / 35.0
	
	get_user_authid(id, authid, 31)
	get_user_name(id, name, 31)
	userid = get_user_userid(id)
	set_hudmessage(g_Values[a][0], g_Values[a][1], g_Values[a][2], tsay ? 0.05 : -1.0, verpos, 0, 6.0, 6.0, 0.5, 0.15, -1)

	switch ( get_pcvar_num(amx_show_activity) )
	{
		case 3, 4:
		{
			new maxpl = get_maxplayers();
			for (new pl = 1; pl <= maxpl; pl++)
			{
				if (is_user_connected(pl) && !is_user_bot(pl))
				{
					if (is_user_admin(pl))
					{
						show_hudmessage(pl, "%s :   %s", name, message[length])
						client_print(pl, print_notify, "%s :   %s", name, message[length])
					}
					else
					{
						show_hudmessage(pl, "%s", message[length])
						client_print(pl, print_notify, "%s", message[length])
					}
				}
			}
			console_print(id, "%s :  %s", name, message[length])
		}
		case 2:
		{
			show_hudmessage(0, "%s :   %s", name, message[length])
			client_print(0, print_notify, "%s :   %s", name, message[length])
			console_print(id, "%s :  %s", name, message[length])
		}
		default:
		{
			show_hudmessage(0, "%s", message[length])
			client_print(0, print_notify, "%s", message[length])
			console_print(id, "%s", message[length])
		}
	}

	if(a==1) {
		client_cmd(0, "spk ^"vox/warning _period message from administration^"")
	}

	log_amx("Chat: ^"%s<%d><%s><>^" %s ^"%s^"", name, userid, authid, cmd[4], message[length])
	log_message("^"%s<%d><%s><>^" triggered ^"%s^" (text ^"%s^") (color ^"%s^")", name, userid, authid, cmd, message[length], color2)

	return PLUGIN_HANDLED
}

stock col_mess(target, team, str[]) {
	message_begin(MSG_ONE, g_msgSayText, _, target)
	write_byte(team)
	write_string(str)
	message_end()
}



91.102.114.182:27024 - [ PokeMod ] P.R.O.S.T.O

88.220.76.37:27018 - [ 4FUN ] P.R.O.S.T.O

82.177.194.185:27018 - [ Ganiany ]P.R.O.S.T.O

91.204.160.145:27018 - [ FFA ] P.R.O.S.T.O

91.204.160.145:27017 - [ System Punktow ] P.R.O.S.T.O

193.143.121.131:27236 - [ Team Play ] P.R.O.S.T.O

www.pukawka.pl | www.gamesnet.pl | www.zonegame.pl | www.KampNO.pl | www.EX88.pl
  
Odpowiedz

Narzędzia wątku

Podobne wątki
Temat Forum
[Gra] Pytania
Instalacja i podstawy Counter Strike 1.6 Non Steam
Pytania
Problemy z Counter Strike 1.6 Non Steam
Pytania
Problemy z Counter Strike 1.6 Non Steam
Pytania..
Strony klanowe Counter Strike
2 pytania...
Podstawy, instalacja Counter Strike 1.6 Steam
2 pytania
Pluginy, dodatki, AMX, AMXX
2 pytania
Pluginy, dodatki, AMX, AMXX
3 ważne pytania
Instalacja serwera HLDS Counter Strike 1.6
2 pytania
Pluginy, dodatki, AMX, AMXX
Mam 3 pytania
Pluginy, dodatki, AMX, AMXX

Zasady Postowania
Nie możesz zakładać nowych tematów
Nie możesz pisać wiadomości
Nie możesz dodawać załączników
Nie możesz edytować swoich postów

BB Code jest Włączony
EmotikonyWłączony
[IMG] kod jest Włączony
HTML kod jest Wyłączony
Trackbacks are Włączony
Pingbacks are Włączony
Refbacks are Wyłączony


X Przeglądasz forum jako gość, zarejestruj się aby uzyskać pełen dostęp do wiaderkowego stuff'u ganja

zalogowani nie widzą reklam

Najpopularniejsze zapytania na forum
Chmura zapytań powered by mosh
źle zainstalowałem pluginy co zrobic? cs śmieszne pytania dotyczące chłopaków śmieszne pytania do chłopaków śmieszne pytania do chłopaka śmieszne pytania do chlopaka śmieszne pytania do bravo śmieszne pytania dla chłopaków śmieszne pytania dla chłopaka śmieszne pytania bravo śmieszne pytania śmieszne pluginy do cs śmieszne pluginy do amx śmieszne pluginy do cs śmieszne pluginy cs 1.6 śmieszne pluginy cs śmieszne pluginy ściągnij pluginy na serwer cs ściągnij pluginy do serwa ściągnij pluginy do cs 1.6 ścieżka gdzie wkleić pluginy Śmieszne pytania do bravo zombiemod jakie pluginy zombie mod pluginy zombie mod + pluginy zombie pluginy amxx znaki zapytania przy instalacji counter strike zlosliwe pluginy zielone bronie pluginy cs zielone bronie pluginy zbiór pluginy do amx do cs screensaver desktop fondo build personal converter Serwery CS 1.6 non-steam non steam counter strike 1.6

Powered by vBulletin ® =w= Edition
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
Spolszczenie: vBHELP.pl - Polski Support vBulletin

Inne strony korporacji ;) wiaderko: Portal Counter Strike | Katalog Counter Strike | Forum Wielotematyczne | Free download | Free software download

Copyright © 2007-2008 Counter Strike wiaderko.com