Nieoficjalny polski support AMX Mod X: Descriptive 'Fire in the hole!' (+colors) - HELP ME PLEASE! - Nieoficjalny polski support AMX Mod X

Skocz do zawartości

Ikona Ważne ogłoszenie!

Dołączona grafika


Strona 1 z 1
  • Nie możesz napisać tematu
  • Temat jest zamknięty

Descriptive 'Fire in the hole!' (+colors) - HELP ME PLEASE!

#1 Użytkownik nie jest zalogowany   PEREF 

  • Profesjonalista
  • Grupa Użytkownik
  • Wiek: 19
  • Postów 211
  • Rejestracja 21-luty 08
  • GG:

Status ostrzeżeń

Poziom ostrzeżeń: 50%

Reputacja: 14
Początkujący

Napisano 30 maj 2008 - 00:19

Jakiś typ przerobił ten plugin, żeby działał pod czero prawidłowo, ale jest jeden problem, otóż nick gracza jest taki sam jak granatu, czyli jak rzucamy HE to nick gracza jest na czerwono, FB - nick jest szary, tylko jak rzucam SG to nick gracza ma team color. Da się coś z tym zrobić? Pozdrawiam ;)

//http://forums.alliedmods.net/showthread.php?t=47109
//mod by SylverRat
#include <amxmodx>
#include <cstrike>
#include <amxmisc>

enum grenade {
	GRENADE_HE,
	GRENADE_FLASH,
	GRENADE_SMOKE
}

new const g_grenade_description[_][] = {
	" [HE]",
	" [flash]",
	" [smoke]"
}

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

new const g_grenade_desccolor[_] = {
	COLOR_RED,
	COLOR_GRAY,
	COLOR_GREEN
}

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

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

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

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

#define RADIOTEXT_MSGARG_NUMBER 6

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

new const g_required_radiotype[] = "#Fire_in_the_hole"
new const g_radiotext_template[] = "Fire in the hole!"

new g_msgid_saytext
new g_msgid_teaminfo
new g_playerLocation[32][18]

public plugin_init() {
	register_plugin("Descriptive 'Fire in the hole!'", "0.1", "VEN")
	register_message(get_user_msgid("TextMsg"), "message_text")
	register_event ("Location", "setLocation", "b")
	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) {
			new name[32]
			get_msg_arg_string(RADIOTEXT_MSGARG_CALLERNAME, arg, sizeof arg - 1)

			static text[192]
			new pos = 0
			text[pos++] = g_color_code[COLOR_NORMAL]

			pos += format(text[pos], sizeof text - pos - 1, g_radiotext_template)
			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, name)
					msg_teaminfo(id, teamname)

					return PLUGIN_HANDLED
				}
			}

			msg_saytext(id, text, name)

			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[], name[]) {
	message_begin(MSG_ONE, g_msgid_saytext, _, id)
	write_byte(id) 
	if (is_running("czero")) { 
		write_string("#Game_radio_location")
		write_string(name)
		write_string(g_playerLocation[id]) 
	} else {
		write_string("#Game_radio")
		write_string(name)
	}
	write_string(text)
	message_end()
}

public setLocation() {
	new p = read_data(1)
	read_data(2,g_playerLocation[p],17)
}



[ Dodano: 01-06-2008, 18:10 ]
panowie proszę o pomoc, bardzo zależy mi na tym plugu :)
0

Opcje tematu:


Strona 1 z 1
  • Nie możesz napisać tematu
  • Temat jest zamknięty


  • (3 stron)
  • +
  • 1
  • 2
  • 3
Trackbacks
Adres Trackback Data Trackback'a Łącznie trafień
Descriptive Fire In The Hole - Szukaj w Google sty 18 2010 12:06 1
heto helpmeplaase - Szukaj w Google maj 27 2010 14:34 1
descriptive fire in the hole pl - Szukaj w Google cze 05 2010 09:57 1
#game_radio_location - Google Search cze 09 2010 22:02 1
Not Available cze 11 2010 22:17 1
Not Available cze 14 2010 18:10 1
fireinthehole.amxx - Szukaj w Google cze 19 2010 11:22 1
Descriptive Fire In The Hole - Szukaj w Google cze 28 2010 09:58 1
#Game_radio_location - Szukaj w Google lip 06 2010 12:00 1
descriptive fire in the hole - Szukaj w Google lip 06 2010 15:43 1
  • (3 stron)
  • +
  • 1
  • 2
  • 3

Podobne tematy
  Temat Autor Podsumowanie Ostatni post
Popularny (nowe posty) Ikona Załączniki Descriptive 'Fire in the hole! [PL] -=GoMeZ=- 
  • 19 Odpowiedzi
  • 10664 wyświetleń
Nowe odpowiedzi Ikona Załączniki Fire Rate Control Abes Mapper 
  • 2 Odpowiedzi
  • 2479 wyświetleń
Zamknięty Ikona friendly fire - problem Evell 
  • 6 Odpowiedzi
  • 1824 wyświetleń
Zamknięty Ikona Fire Shot HenieK 
  • 0 Odpowiedzi
  • 271 wyświetleń
Zamknięty Ikona Descriptive zGraferz 
  • 4 Odpowiedzi
  • 203 wyświetleń

Użytkownicy przeglądający ten temat: 1
0 użytkowników, 1 gości, 0 anonimowych



Ten temat został odwiedzony przez 7 użytkownik(ów)