cerere plugin dmg (rezolvat!)

Modificari necesare ale pluginurilor

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Zppp.Mihai94
Membru, skill 0
Membru, skill 0
Posts: 85
Joined: 26 Mar 2018, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

07 Jan 2019, 12:17

Plugin Cerut:
| Afiseaza codul
#include <amxmodx> 
#include <amxmisc> 
#include <dhudmessage> 
#include <fakemeta_util> 

#define PLUGIN "Advanced Bullet Damage" 
#define VERSION "1.0" 
#define AUTHOR "Sn!ff3r" 

new const Float:g_locations[][] = { 

{0.45, 0.5}, {-1.0, 0.55}, {0.55, -1.0}, 
{-1.0, 0.62}, {0.4, 0.55}, {0.55, 0.6} 
} 

new g_location[33] 

new g_type, g_enabled, g_recieved, bool:g_showrecieved 

public plugin_init()  { 

register_plugin(PLUGIN, VERSION, AUTHOR) 

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") 
} 

public on_new_round() { 

g_enabled = get_pcvar_num(g_type) 
g_showrecieved = bool:get_pcvar_num(g_recieved) 
} 

public on_damage(id) { 

if(g_enabled) {         
     
static attacker; attacker = get_user_attacker(id) 
static damage; damage = read_data(2) 
new r = random(256) 
new g = random(256) 
new b = random(256) 
     
if(g_showrecieved) {             
         
set_hudmessage(255, 0, 0, g_locations[g_location[id]][0], g_locations[g_location[id]][1], 2, 0.1, 4.0, 0.1, 0.1, -1) 
show_hudmessage(id, "%i^n", damage) 
g_location[id] = ++g_location[id] % sizeof(g_locations) 
} 
if(is_user_connected(attacker)) { 
         
switch(g_enabled) { 
             
case 1: { 
                 
set_hudmessage(r, g, b, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02, -1) 
show_hudmessage(attacker, "%i^n", damage)                 
g_location[attacker] = ++g_location[attacker] % sizeof(g_locations) 
} 
case 2: { 
                     
if(fm_is_ent_visible(attacker,id)) { 

set_hudmessage(r, g, b, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02, -1) 
show_hudmessage(attacker, "%i^n", damage)                     
g_location[attacker] = ++g_location[attacker] % sizeof(g_locations) 
} 
} 
} 
} 
} 
}
Descriere (adica ce face el mai exact): il poate face cineva sa apara scrisul de la dmg pe care il dau sa fie mai mare? e mic si nu prea se observa asa bine, daca se poate face sa apara mare si la dmg pe care il da omul si la cel care primeste sa fie la acelasi dimensiuni.
Serverul ruleaza (HLDS/ReHLD): rehlds
Versiune AMX Mod X: 1.8.3
Modul Serverului: zombie plague
Last edited by VLD00 on 07 Jan 2019, 20:14, edited 1 time in total.
Reason: Marcat ca "rezolvat"
RoyalServer 2
User avatar
levin
Scripter eXtreamCS
Scripter eXtreamCS
Posts: 3844
Joined: 24 Aug 2011, 12:24
Detinator Steam: Da
CS Status:
Detinator server CS: ☯∴
SteamID: riseofevo
Reputatie: Scripter eXtreamCS
Nume anterior: Adryyy
Location: ҳ̸Ҳ̸ҳ
Discord: devilclass
Has thanked: 36 times
Been thanked: 594 times
Contact:

07 Jan 2019, 18:36

| Afiseaza codul
#include <amxmodx> 
	#include <amxmisc> 
	#include <dhudmessage> 
	#include <fakemeta_util> 

	#pragma tabsize 0

	#define PLUGIN "Advanced Bullet Damage" 
	#define VERSION "1.0" 
	#define AUTHOR "Sn!ff3r" 

	new const Float:g_locations[][] = { 

	{0.45, 0.5}, {-1.0, 0.55}, {0.55, -1.0}, 
	{-1.0, 0.62}, {0.4, 0.55}, {0.55, 0.6} 
	} 

	new g_location[33] 

	new g_type, g_enabled, g_recieved, bool:g_showrecieved 

	public plugin_init()  { 

	register_plugin(PLUGIN, VERSION, AUTHOR) 

	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") 
	} 

	public on_new_round() { 

	g_enabled = get_pcvar_num(g_type) 
	g_showrecieved = bool:get_pcvar_num(g_recieved) 
	} 

	public on_damage(id) { 

	if(g_enabled) {         
		 
	static attacker; attacker = get_user_attacker(id) 
	static damage; damage = read_data(2) 
	new r = random(256) 
	new g = random(256) 
	new b = random(256) 
		 
	if(g_showrecieved) {             
			 
	set_dhudmessage(255, 0, 0, g_locations[g_location[id]][0], g_locations[g_location[id]][1], 2, 0.1, 4.0, 0.1, 0.1) 
	show_dhudmessage(id, "%i^n", damage) 
	g_location[id] = ++g_location[id] % sizeof(g_locations) 
	} 
	if(is_user_connected(attacker)) { 
			 
	switch(g_enabled) { 
				 
	case 1: { 
					 
	set_dhudmessage(r, g, b, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02) 
	show_dhudmessage(attacker, "%i^n", damage)                 
	g_location[attacker] = ++g_location[attacker] % sizeof(g_locations) 
	} 
	case 2: { 
						 
	if(fm_is_ent_visible(attacker,id)) { 

	set_dhudmessage(r, g, b, g_locations[g_location[attacker]][0], g_locations[g_location[attacker]][1], 2, 0.1, 4.0, 0.02, 0.02) 
	show_dhudmessage(attacker, "%i^n", damage)                     
	g_location[attacker] = ++g_location[attacker] % sizeof(g_locations) 
	} 
	} 
	} 
	} 
	} 
	}
Pentru ajutor, faceți cerere bine detaliată, completând și respectând modelul corespunzător.
Nu-mi mai dați cereri doar pentru a mă avea în lista de prieteni.
Dacă te ajut, și mă ignori/etc > te adaug în „foe”.
Aveți grijă la cei ce încearcă să mă copieze sau să dea drept mine..Puteți lua legătura cu mine prin STEAM dacă aveți o problemă/nelămurire în acest caz! Cont de forum am doar aici.
În cazul în care utilizați ceva din ce am postat(ex: aici), e bine să fiți la curent cu modificările aduse și de aici, iar dacă sunt ceva probleme nu ezitați să luați legătura cu mine. Actualizarea unor coduri nu se vor afișa public, doar dacă se găsește ceva critic/urgent de remediat, unele fiind coduri vechi iar unele refăcute chiar recent dar private.
* Nume pe cs1.6: eVoLuTiOn \ Nume vechi: eVo
* Atelierul meu - post2819572.html#p2819572 (închis, click link ca să vedeți de ce)
Zppp.Mihai94
Membru, skill 0
Membru, skill 0
Posts: 85
Joined: 26 Mar 2018, 17:51
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

07 Jan 2019, 20:04

multumesc, functioneaza perfect.
Post Reply

Return to “Modificari pluginuri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 7 guests