Skocz do zawartości

Witamy w Nieoficjalnym polskim support'cie AMX Mod X

Witamy w Nieoficjalnym polskim support'cie AMX Mod X, jak w większości społeczności internetowych musisz się zarejestrować aby móc odpowiadać lub zakładać nowe tematy, ale nie bój się to jest prosty proces w którym wymagamy minimalnych informacji.
  • Rozpoczynaj nowe tematy i odpowiedaj na inne
  • Zapisz się do tematów i for, aby otrzymywać automatyczne uaktualnienia
  • Dodawaj wydarzenia do kalendarza społecznościowego
  • Stwórz swój własny profil i zdobywaj nowych znajomych
  • Zdobywaj nowe doświadczenia

Dołączona grafika Dołączona grafika

Guest Message by DevFuse
 

Zdjęcie
Naprawienie

Naprawa VIP'a

Naprawienie

  • Zamknięty Temat jest zamknięty
1 odpowiedź w tym temacie

#1 Gufinsky

    Wszechwiedzący

  • Power User

Reputacja: 267
Wszechwidzący

  • Postów:591
  • Imię:Kuba
  • Lokalizacja:localhost
Offline

Napisano 28.03.2011 20:45

Witam, napisałem vipa na dd2 na szybko. Gracze z VIPEM mówią, że są problemy - nie ma radaru, nie można otworzyć menu kupowania - b.
Vip posiada
- 1000$ co runde
- zestaw granatów
- bullet damage
- nick po wpisaniu /vips
- VIP w tabeli

KOD: Wklejka 130134144412065 - AMXX.pl: Support AMX Mod X
  • +
  • -
  • 0

#2 speedkill

    Godlike

  • Przyjaciel

Reputacja: 1 592
Godlike

  • Postów:2 733
  • GG:
  • Steam:steam
  • Imię:Michał
  • Lokalizacja:Prudnik
Offline

Napisano 01.04.2011 18:11

trzymaj :)
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <fun>
#include <cstrike>
#include <fakemeta_util>

#define PLUGIN "Vip"
#define VERSION "1.0"
#define AUTHOR "twoj nick <img src='http://img.amxx.pl/public/style_emoticons/<#EMO_DIR#>/smile.gif' class='bbc_emoticon' alt=':)' />"

#define ADMIN_VIP ADMIN_LEVEL_H

#define SCOREATTRIB_NONE    0
#define SCOREATTRIB_DEAD    ( 1 << 0 )
#define SCOREATTRIB_BOMB    ( 1 << 1 )
#define SCOREATTRIB_VIP  ( 1 << 2 )

#define ADMIN_CHECK ADMIN_LEVEL_H

static const COLOR[] = "^x04" //green
static const CONTACT[] = ""

new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2

new bool:gbAccess[33];

new maxplayers
new gmsgSayText

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	maxplayers = get_maxplayers()
	gmsgSayText = get_user_msgid("SayText")
	register_clcmd("say", "handle_say")
	register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
	register_message( get_user_msgid( "ScoreAttrib" ), "MessageScoreAttrib" );
	
	register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")	
	register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
	
	g_type = register_cvar("amx_bulletdamage","1")
	g_recieved = register_cvar("amx_bulletdamage_recieved","1")	
	
	g_hudmsg1 = CreateHudSyncObj()	
	g_hudmsg2 = CreateHudSyncObj()
}
public client_putinserver(id){
	gbAccess[id] = (get_user_flags(id) & read_flags("t")) > 0;
}
public on_new_round()
{
	g_enabled = get_pcvar_num(g_type)
	if(get_pcvar_num(g_recieved)) g_showrecieved = true	
}

public on_damage(id)
{
	if(g_enabled)
	{		
		static attacker; attacker = get_user_attacker(id)
		static damage; damage = read_data(2)		
		if(g_showrecieved && gbAccess[id])
		{			
			set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
			ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)		
		}
		if(is_user_connected(attacker) && gbAccess[attacker])
		{
			switch(g_enabled)
			{
				case 1: {
					set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
					ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
				}
				case 2: {
					if(fm_is_ent_visible(attacker,id))
					{
						set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
						ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)				
					}
				}
			}
		}
	}
}
public fwHamPlayerSpawnPost(id){
        
        if (get_user_flags(id) & ADMIN_LEVEL_H) 
	{
                new kasa = cs_get_user_money(id)
                cs_set_user_money(id, kasa + 1000)         
                give_item(id, "weapon_smokegrenade")
                give_item(id, "weapon_hegrenade")
                give_item(id, "weapon_flashbang")
                give_item(id, "weapon_flashbang")
                client_print(id, print_center, "Otrzymales 1000 $ oraz zestaw granatow!")
        }
}
public handle_say(id) {
	new said[192]
	read_args(said,192)
	if( ( containi(said, "who") != -1 && containi(said, "admin") != -1 ) || contain(said, "/vips") != -1 )
		set_task(0.1,"print_adminlist",id)
	return PLUGIN_CONTINUE
}

public print_adminlist(user) 
{
	new adminnames[33][32]
	new message[256]
	new contactinfo[256], contact[112]
	new id, count, x, len
	
	for(id = 1 ; id <= maxplayers ; id++)
		if(is_user_connected(id))
			if(get_user_flags(id) & ADMIN_CHECK)
				get_user_name(id, adminnames[count++], 31)

	len = format(message, 255, "%s Vipy online: ",COLOR)
	if(count > 0) {
		for(x = 0 ; x < count ; x++) {
			len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
			if(len > 96 ) {
				print_message(user, message)
				len = format(message, 255, "%s ",COLOR)
			}
		}
		print_message(user, message)
	}
	else {
		len += format(message[len], 255-len, "Brak vipow online.")
		print_message(user, message)
	}
	
	get_cvar_string("amx_contactinfo", contact, 63)
	if(contact[0])  {
		format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
		print_message(user, contactinfo)
	}
}

print_message(id, msg[]) {
	message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
	write_byte(id)
	write_string(msg)
	message_end()
}
public MessageScoreAttrib( iMsgID, iDest, iReceiver ) {
    new iPlayer = get_msg_arg_int( 1 );
    if( is_user_connected( iPlayer )
    && ( get_user_flags( iPlayer ) & ADMIN_VIP ) ) {
        set_msg_arg_int( 2, ARG_BYTE, is_user_alive( iPlayer ) ? SCOREATTRIB_VIP : SCOREATTRIB_DEAD );
    }
}

  • +
  • -
  • 0

If you can dream it, you can do it.






Również z jednym lub większą ilością słów kluczowych: Naprawienie

Użytkownicy przeglądający ten temat: 0

0 użytkowników, 0 gości, 0 anonimowych