Polecane strony: WyszukiwarkaSerwery Counter StrikeForum wiaderko.netForum Fun-Board.netFilmy Counter StrikeSyriuszWitraże

Kupując reklamę wspierasz akcje charytatywne

Wróć   Forum Wiaderko > Forum Counter Strike > Amx Mod X > Pisanie pluginów AMXX

Pisanie pluginów AMXX - Dział poświęcony pisaniu pluginów do AMXX


Tagi: , , , , ,

Popularne odwołania do tej strony: grenade description amxx, descriptive fire in the hole new
Zamknięty Temat
 Odsłon tematu: 866
Narzędzia wątku

Descriptive 'Fire in the hole' [PRZERÓBKA]

bluSkay.aka is Offline
Tata Neo i Taza
 
Avatar bluSkay.aka
 
Postów: 4,348

Poziom upalenia:
XXXXXX-- Doświadczenie: kręci lolki lewą ręką
Zarejestrowany: Apr 2008
   

Witam, chciałbym aby ktoś mi poprawił komunikaty przy rzuconych granatach.
HE komunikat na czerwono [UWAGA HEJDZ]
FLASH komunikat na biało [UWAGA MLEKO]
SMOKE komunikat na zielono [DYMIACA PALA]
I tyle ;)
Sam coś w kodzie .sma poprawiałem ale nic nie działa, tak więc prosze o wyrozumiałośc :)
  

Odp: Descriptive 'Fire in the hole' [PRZERÓBKA]

naven is Offline
Super Mod
 
Avatar naven
 
Postów: 9,081

Poziom upalenia:
XXXXXXX- Doświadczenie: konsument, hodowca, eksporter
Zarejestrowany: Jan 2008
Wiek: 19
   

Dawaj kod


Najlepszy hosting www tutaj
Nowa strona, nowe zdjęcia: http://naven.com.pl/
Konfiguracja amxx, instalacja pluginów, pisanie pluginów AMXX. Więcej info na www.naven.com.pl
Jebać steama.
  

Odp: Descriptive 'Fire in the hole' [PRZERÓBKA]

bluSkay.aka is Offline
Tata Neo i Taza
 
Avatar bluSkay.aka
 
Postów: 4,348

Poziom upalenia:
XXXXXX-- Doświadczenie: kręci lolki lewą ręką
Zarejestrowany: Apr 2008
   

Kod:
/* AMX Mod X
*   Descriptive 'Fire in the hole!'
*
* (c) Copyright 2006 by VEN
*
* This file is provided as is (no warranties)
*
*     DESCRIPTION
*       Plugin provides additional colored text for "Fire in the hole!" radio chat message.
*       The color and the text is different for each grenade type and can be altered.
*       This will help teammates to get the throwed grenade type and act accordingly.
*       Search for "EDITABLE" mark in the plugin's source code to configure text and color.
*
*     CREDITS
*       Damaged Soul - colored chat text method
*       p3tsin - team color override method
*/

#include <amxmodx>

#define PLUGIN_NAME "Descriptive 'Fire in the hole!'"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

enum grenade {
	GRENADE_HE,
	GRENADE_FLASH,
	GRENADE_SMOKE
}

// EDITABLE: grenade description
new const g_grenade_description[_:grenade][] = {
	" [UWAGA HEJDZ]",
	" [UWAGA MLEKO]",
	" [DYMIACA PALA]"
}

enum color {
	COLOR_NORMAL,
	COLOR_RED,
	COLOR_BLUE,
	COLOR_GRAY,
	COLOR_GREEN
}

// EDITABLE: grenade description text color
new const g_grenade_desccolor[_:grenade] = {
	COLOR_RED,
	COLOR_GRAY,
	COLOR_GREEN
}

new const g_grenade_weaponid[_:grenade] = {
	CSW_HEGRENADE,
	CSW_FLASHBANG,
	CSW_SMOKEGRENADE
}

#define COLORCODE_NORMAL 0x01
#define COLORCODE_TEAM 0x03
#define COLORCODE_LOCATION 0x04

new const g_color_code[_:color] = {
	COLORCODE_NORMAL,
	COLORCODE_TEAM,
	COLORCODE_TEAM,
	COLORCODE_TEAM,
	COLORCODE_LOCATION
}

new const g_color_teamname[_:color][] = {
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR",
	""
}

#define RADIOTEXT_MSGARG_NUMBER 5

enum radiotext_msgarg {
	RADIOTEXT_MSGARG_PRINTDEST = 1,
	RADIOTEXT_MSGARG_CALLERID,
	RADIOTEXT_MSGARG_TEXTTYPE,
	RADIOTEXT_MSGARG_CALLERNAME,
	RADIOTEXT_MSGARG_RADIOTYPE,
}

new const g_required_radiotype[] = "#Fire_in_the_hole"
new const g_radiotext_template[] = "%s (RADIO): Fire in the hole!"

new g_msgid_saytext
new g_msgid_teaminfo

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	register_message(get_user_msgid("TextMsg"), "message_text")

	g_msgid_saytext = get_user_msgid("SayText")
	g_msgid_teaminfo = get_user_msgid("TeamInfo")
}

public message_text(msgid, dest, id) {
	if (get_msg_args() != RADIOTEXT_MSGARG_NUMBER || get_msg_argtype(RADIOTEXT_MSGARG_RADIOTYPE) != ARG_STRING)
		return PLUGIN_CONTINUE

	static arg[32]
	get_msg_arg_string(RADIOTEXT_MSGARG_RADIOTYPE, arg, sizeof arg - 1)
	if (!equal(arg, g_required_radiotype))
		return PLUGIN_CONTINUE

	get_msg_arg_string(RADIOTEXT_MSGARG_CALLERID, arg, sizeof arg - 1)
	new caller = str_to_num(arg)
	if (!is_user_alive(caller))
		return PLUGIN_CONTINUE

	new clip, ammo, weapon
	weapon = get_user_weapon(caller, clip, ammo)
	for (new i; i < sizeof g_grenade_weaponid; ++i) {
		if (g_grenade_weaponid[i] == weapon) {
			static text[192]
			new pos = 0
			text[pos++] = g_color_code[COLOR_NORMAL]

			get_msg_arg_string(RADIOTEXT_MSGARG_CALLERNAME, arg, sizeof arg - 1)
			pos += formatex(text[pos], sizeof text - pos - 1, g_radiotext_template, arg)
			copy(text[++pos], sizeof text - pos - 1, g_grenade_description[i])

			new desccolor = g_grenade_desccolor[i]
			if ((text[--pos] = g_color_code[desccolor]) == COLORCODE_TEAM) {
				static teamname[12]
				get_user_team(id, teamname, sizeof teamname - 1)

				if (!equal(teamname, g_color_teamname[desccolor])) {
					msg_teaminfo(id, g_color_teamname[desccolor])
					msg_saytext(id, text)
					msg_teaminfo(id, teamname)

					return PLUGIN_HANDLED
				}
			}

			msg_saytext(id, text)

			return PLUGIN_HANDLED
		}
	}

	return PLUGIN_CONTINUE
}

msg_teaminfo(id, teamname[]) {
	message_begin(MSG_ONE, g_msgid_teaminfo, _, id)
	write_byte(id)
	write_string(teamname)
	message_end()
}

msg_saytext(id, text[]) {
	message_begin(MSG_ONE, g_msgid_saytext, _, id)
	write_byte(id)
	write_string(text)
	message_end()
}


Tam ja małą zmiane wprowadziłem i ona nie działa, więc dalej nie kombinuje, bo hooy wie co zrobie ;)
  

Odp: Descriptive 'Fire in the hole' [PRZERÓBKA]

naven is Offline
Super Mod
 
Avatar naven
 
Postów: 9,081

Poziom upalenia:
XXXXXXX- Doświadczenie: konsument, hodowca, eksporter
Zarejestrowany: Jan 2008
Wiek: 19
   

Miałem na myśli działający kod.
  

Odp: Descriptive 'Fire in the hole' [PRZERÓBKA]

bluSkay.aka is Offline
Tata Neo i Taza
 
Avatar bluSkay.aka
 
Postów: 4,348

Poziom upalenia:
XXXXXX-- Doświadczenie: kręci lolki lewą ręką
Zarejestrowany: Apr 2008
   

Kod:
/* AMX Mod X
*   Descriptive 'Fire in the hole!'
*
* (c) Copyright 2006 by VEN
*
* This file is provided as is (no warranties)
*
*     DESCRIPTION
*       Plugin provides additional colored text for "Fire in the hole!" radio chat message.
*       The color and the text is different for each grenade type and can be altered.
*       This will help teammates to get the throwed grenade type and act accordingly.
*       Search for "EDITABLE" mark in the plugin's source code to configure text and color.
*
*     CREDITS
*       Damaged Soul - colored chat text method
*       p3tsin - team color override method
*/

#include <amxmodx>

#define PLUGIN_NAME "Descriptive 'Fire in the hole!'"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"

enum grenade {
	GRENADE_HE,
	GRENADE_FLASH,
	GRENADE_SMOKE
}

// EDITABLE: grenade description
new const g_grenade_description[_:grenade][] = {
	" [explosive]",
	" [flashbang]",
	" [smokegren]"
}

enum color {
	COLOR_NORMAL,
	COLOR_RED,
	COLOR_BLUE,
	COLOR_GRAY,
	COLOR_GREEN
}

// EDITABLE: grenade description text color
new const g_grenade_desccolor[_:grenade] = {
	COLOR_RED,
	COLOR_GRAY,
	COLOR_GREEN
}

new const g_grenade_weaponid[_:grenade] = {
	CSW_HEGRENADE,
	CSW_FLASHBANG,
	CSW_SMOKEGRENADE
}

#define COLORCODE_NORMAL 0x01
#define COLORCODE_TEAM 0x03
#define COLORCODE_LOCATION 0x04

new const g_color_code[_:color] = {
	COLORCODE_NORMAL,
	COLORCODE_TEAM,
	COLORCODE_TEAM,
	COLORCODE_TEAM,
	COLORCODE_LOCATION
}

new const g_color_teamname[_:color][] = {
	"",
	"TERRORIST",
	"CT",
	"SPECTATOR",
	""
}

#define RADIOTEXT_MSGARG_NUMBER 5

enum radiotext_msgarg {
	RADIOTEXT_MSGARG_PRINTDEST = 1,
	RADIOTEXT_MSGARG_CALLERID,
	RADIOTEXT_MSGARG_TEXTTYPE,
	RADIOTEXT_MSGARG_CALLERNAME,
	RADIOTEXT_MSGARG_RADIOTYPE,
}

new const g_required_radiotype[] = "#Fire_in_the_hole"
new const g_radiotext_template[] = "%s (RADIO): Fire in the hole!"

new g_msgid_saytext
new g_msgid_teaminfo

public plugin_init() {
	register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)

	register_message(get_user_msgid("TextMsg"), "message_text")

	g_msgid_saytext = get_user_msgid("SayText")
	g_msgid_teaminfo = get_user_msgid("TeamInfo")
}

public message_text(msgid, dest, id) {
	if (get_msg_args() != RADIOTEXT_MSGARG_NUMBER || get_msg_argtype(RADIOTEXT_MSGARG_RADIOTYPE) != ARG_STRING)
		return PLUGIN_CONTINUE

	static arg[32]
	get_msg_arg_string(RADIOTEXT_MSGARG_RADIOTYPE, arg, sizeof arg - 1)
	if (!equal(arg, g_required_radiotype))
		return PLUGIN_CONTINUE

	get_msg_arg_string(RADIOTEXT_MSGARG_CALLERID, arg, sizeof arg - 1)
	new caller = str_to_num(arg)
	if (!is_user_alive(caller))
		return PLUGIN_CONTINUE

	new clip, ammo, weapon
	weapon = get_user_weapon(caller, clip, ammo)
	for (new i; i < sizeof g_grenade_weaponid; ++i) {
		if (g_grenade_weaponid[i] == weapon) {
			static text[192]
			new pos = 0
			text[pos++] = g_color_code[COLOR_NORMAL]

			get_msg_arg_string(RADIOTEXT_MSGARG_CALLERNAME, arg, sizeof arg - 1)
			pos += formatex(text[pos], sizeof text - pos - 1, g_radiotext_template, arg)
			copy(text[++pos], sizeof text - pos - 1, g_grenade_description[i])

			new desccolor = g_grenade_desccolor[i]
			if ((text[--pos] = g_color_code[desccolor]) == COLORCODE_TEAM) {
				static teamname[12]
				get_user_team(id, teamname, sizeof teamname - 1)

				if (!equal(teamname, g_color_teamname[desccolor])) {
					msg_teaminfo(id, g_color_teamname[desccolor])
					msg_saytext(id, text)
					msg_teaminfo(id, teamname)

					return PLUGIN_HANDLED
				}
			}

			msg_saytext(id, text)

			return PLUGIN_HANDLED
		}
	}

	return PLUGIN_CONTINUE
}

msg_teaminfo(id, teamname[]) {
	message_begin(MSG_ONE, g_msgid_teaminfo, _, id)
	write_byte(id)
	write_string(teamname)
	message_end()
}

msg_saytext(id, text[]) {
	message_begin(MSG_ONE, g_msgid_saytext, _, id)
	write_byte(id)
	write_string(text)
	message_end()
}


Mała zmianka tylko była :)
  
Zamknięty Temat

Bookmarks

Narzędzia wątku

Podobne wątki
Temat Forum
[przerobka] Przerobka stopki
Typ Pracy: Stopka Wymiary: 958x50 Napis: Tam gdzie pisze 'nazwa klanu' wytluszczonym drukiem napisac Alternative Gaming równierz wytłuszczonym drukiem Dodatkowy Napis:- Kolorystyka: - Tematyka: - Nagroda:gibon za każdą wykonaną prace :) Praca do przerobienia -...
Prośby o wykonanie grafiki
PROBELM "Description fire in the hole"
Witajcie mam problem z pluginem fire in the hole bo nie na kazdej mapie on dziala wezmy taka:De_dust2 zamiast pisac "Uwaga Granat " Pisze "Fire In The Hole!!!@Bridge*" no i nie wiem ocbg help Bridge=dalem takie miejsce moze byc tez Tunnel np
Problem z pluginem AMX/AMXX
Problem z 'Description fire in the hole'
Cześć chciałbym prosić o plugin description fire in the hole 'Fire in the hole'spolszczyc na Uwaga Granat!!! a granaty na zeby wygladalo np:tak Uwaga Granat!!! Proszil bym o skaplikowanie bo mi sie jakos nie udaje :((
Problem z pluginem AMX/AMXX
Język komendy głosowe Fire in a hole itp.
Witam. Gram w Cs'a non steam. I komendy głosowe np. cover me fire in a hole, są mówione po francusku. Tekstowe(napisy) są po angielsku i w takim samym języku chciałby mieć komeny głosowe.
Problemy z CS 1.6
Fire In The Hole - Zapraszam
Fire In The Hole - unixstorm.org *IP Address: 77.79.241.196 *Platforma: Non Steam *Ilość slotów: 14+2 *Typ: TP *Czynny: 24/7 *Friendlyfire: Off *Mod GunGame na mapach gg_ *Kontakt: GG: 1937692 *Forum: Fire In The Hole :: Strona Główna
Archiwum serwerów Counter Strike 1.6 Steam i Non Steam
Fire Child Born Into The Fire
Darmowe gry online - Fire Child Born Into The Fire Zagraj za darmo w grę Fire Child Born Into The Fire Krótki opis: Wcielamy się w księżniczkę żywiołu ognia i uciekamy z pałacu pilnowanego przez uzbrojonych strażników. Nie możemy dopuścić do tego, ażeby zauważyli nas strażnicy. Kiedy już...
Gry przygodowe online
Przeróbka map z CSS do CS1.6ns
Czy jest możliwa przeróbka mapy z CSS do CS1.6ns? Jeżeli tak to czy ktoś mógł by przerobić mapę de_dust2? Jeżeli ktoś pomoże stawiam gibona:grin:
Mapy do Counter Strike
Wyciszenie dzwieku fire in the hole itp. ?
chodzi mi o to ze gdy kilku graczy rzuci granatami i pojawia sie dzwiek "fire in the hole" to zaglusza on biegnacego lub strzelajacego wroga... da sie je jakos sciszyc lub wylaczyc by nie kolidowaly z bieganiem i innymi wazniejszymi dzwiekami ??
Problemy z CS 1.6
Descriptive 'Fire in the hole!'
Descriptive 'Fire in the hole!' Opis Plugin zawiera dodatkowe kolorowy tekst "Fire in the hole!" radiowe wiadomości czatu. Kolor i tekst jest inny dla każdego typu granatu i może ulec zmianie. Pomoże to w drużynie, aby odróżnić rodzaj rzuconego granatu. Kolory, oraz napisy zmieniamy w...
Przydatne pluginy AMX i AMXX
Fire in the Hole
Gra Flash - Fire in the Hole Zapraszam do grania w darmowe gry flash na forum.wiaderko.com :grin: http://www.forum.wiaderko.com/swf/854.swf
Gry strzelanki online


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

zalogowani nie widzą reklam


Copyright © 2006-2011 Forum Wiaderko - Counter Strike, gry, programy, muzyka, mp3, filmy, download, rapidshare, pobierz