[rezolvat] CERERE MODIFICARE PLUGIN

Categoria cu cereri de pluginuri si nu numai.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Forum rules
Accesează link-ul pentru a putea vedea regulile forumului

Daca doriti sa vi se modifice un plugin, va rugam postati aici .
Post Reply
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 22:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

30 Nov 2013, 18:10

SALUT, Cine ma poate sa imi modifice acest plugin pentru biohazard , eu nu am reusit de fel.

MESAJELE WIN IS PENTRU INLOCUIREA CELOR DIN ZP
MESAJE WIN | Afiseaza codul
public msg_textmsg(msgid, dest, id)
{
	if(get_msg_arg_int(1) != 4)
		return PLUGIN_CONTINUE
	
	static txtmsg[25], winmsg[32]
	get_msg_arg_string(2, txtmsg, 24)
	
	if(equal(txtmsg[1], "Game_bomb_drop"))
		return PLUGIN_HANDLED

	else if(equal(txtmsg[1], "Terrorists_Win"))
	{
ShowSyncHudMsg(0, g_sync_msgdisplay, "ZOMBIE WIN!")
		return PLUGIN_HANDLED;
	}
	else if(equal(txtmsg[1], "Target_Saved") || equal(txtmsg[1], "CTs_Win"))
	{
ShowSyncHudMsg(0, g_sync_msgdisplay, "HUMAN WIN!")
	return PLUGIN_HANDLED;
	}
	return PLUGIN_CONTINUE;
}
SMA PLUGIN | Afiseaza codul
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <hamsandwich>
#include <dhudmessage>
#include <zombieplague>

#define PLUGIN "[MONEY_SYSTEM]All"
#define VERSION "1.7"
#define AUTHOR "Arwel"

//==========================================
#define ADMIN_LEVEL ADMIN_RESERVATION
//==========================================
#define LIMIT 150000
#define LIMIT_ADMIN 500000
//==========================================
#define COLOR_INFO {0, 255, 0}

#define COLOR_HUMAN_WIN {0, 255, 0}
#define COLOR_HUMAN_LOSE {255, 0, 0}

#define COLOR_ZOMBIE_WIN {255, 0, 0}
#define COLOR_ZOMBIE_LOSE {255, 0, 0}

#define COLOR_DRAW {255, 255, 255}
//==========================================
#define CONFIG_CFG_FILE "zp_buymenu.cfg"
//==========================================

native zp_cs_set_user_money(id, value)
native zp_cs_get_user_money(id)

new pcvar_default

new pcvar_humans_reward_win, pcvar_humans_reward_lose, pcvar_humans_reward_no_one
new pcvar_humans_dmg_reward, pcvar_humans_kill_reward

new pcvar_zombies_reward_win, pcvar_zombies_reward_lose, pcvar_zombies_reward_no_one
new  pcvar_zombies_kill_reward

new g_MaxPlayers, g_First=true

public plugin_init() 
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_dictionary("buymenu.txt")
	
	RegisterHam(Ham_Spawn, "player", "fwSpawn", 1)
	RegisterHam(Ham_TakeDamage, "player", "fwTakeDamage", 1)
	RegisterHam(Ham_Killed, "player", "fwKilled", 1)
	
	pcvar_default=register_cvar("ms_default_money", "3200")
	
	pcvar_humans_reward_win=register_cvar("ms_human_win_reward", "3000")
	pcvar_humans_reward_lose=register_cvar("ms_human_lose_reward", "1500")
	pcvar_humans_reward_no_one=register_cvar("ms_human_no_one_reward", "2000")
	pcvar_humans_dmg_reward=register_cvar("ms_human_damage_reward_divide", "2")
	pcvar_humans_kill_reward=register_cvar("ms_human_kill_reward", "300")
	
	pcvar_zombies_reward_win=register_cvar("ms_zombie_win_reward", "3000")
	pcvar_zombies_reward_lose=register_cvar("ms_zombie_lose_reward", "1500")
	pcvar_zombies_reward_no_one=register_cvar("ms_zombie_no_one_reward", "2000")	
	pcvar_zombies_kill_reward=register_cvar("ms_zombie_kill_reward", "300")	
	
	g_MaxPlayers=get_maxplayers()
}

public plugin_cfg()
{
	new confdir[64], path[128]
	
	get_configsdir(confdir, charsmax(confdir))
	
	formatex(path, charsmax(path), "%s/%s", confdir, CONFIG_CFG_FILE)
	
	server_cmd("exec %s", path)
	server_exec()	
}

public zp_round_ended(winteam)
{
	if(!g_First)
	{
		switch(winteam)
		{
			case WIN_NO_ONE: cycle_players_set_money(2, COLOR_DRAW, COLOR_DRAW, get_pcvar_num(pcvar_humans_reward_no_one), get_pcvar_num(pcvar_zombies_reward_no_one))
				
			case WIN_ZOMBIES: cycle_players_set_money(0, COLOR_HUMAN_LOSE, COLOR_ZOMBIE_WIN, get_pcvar_num(pcvar_humans_reward_lose), get_pcvar_num(pcvar_zombies_reward_win))	
	
			case WIN_HUMANS: cycle_players_set_money(1, COLOR_HUMAN_WIN, COLOR_ZOMBIE_LOSE, get_pcvar_num(pcvar_humans_reward_win), get_pcvar_num(pcvar_zombies_reward_lose))	
		}
	}
	
	g_First=false
}

public client_connect(id)
{
	if(!zp_cs_get_user_money(id))
		zp_cs_set_user_money(id, get_pcvar_num(pcvar_default))
}

public fwSpawn(id)
{
	if(!is_user_alive(id))
		return
	
	set_task(0.3, "TaskMessage", id)
}

public TaskMessage(id)
{
	if(!is_user_alive(id))
		return

	//client_cmd(id, "buy")
	
	new temp[64]
	
	formatex(temp, 63, "%L", id, "HUD_INFO")
	
	show_message(id, COLOR_INFO, -1.0, 0.8, temp)	
}

public fwTakeDamage(id, weapon, attacker, Float:damage)
{	
	if(!is_user_alive(attacker))
		return
		
	if(zp_get_user_zombie(attacker))
		return	
		
	damage/=get_pcvar_num(pcvar_humans_dmg_reward)
			
	set_money(attacker, floatround(damage))
}

public fwKilled(id, killer)
{
	if(!is_user_alive(killer))
		return
	
	set_money(killer, get_pcvar_num(zp_get_user_zombie(killer)?pcvar_zombies_kill_reward:pcvar_humans_kill_reward))
}

public zp_user_infected_pre(id, infector)
{
	if(is_user_alive(infector))
		set_money(infector, get_pcvar_num(pcvar_zombies_kill_reward))
}

public cycle_players_set_money(message_index, rgb_hum[3], rgb_zb[3], money_hum, money_zb)
{
	new temp[64]
	
	for(new i=1; i<=g_MaxPlayers; i++)
	{
		if(!is_user_connected(i)||get_user_team(i)==4||get_user_team(i)==0)
			continue
		
		if(zp_get_user_zombie(i))
		{
			switch(message_index)
			{
				case 0: formatex(temp, 63, "%L", i, "HUD_MESSAGE_ZB_WIN", money_zb)
				
				case 1: formatex(temp, 63, "%L", i,  "HUD_MESSAGE_ZB_FAIL", money_zb)
				
				case 2: formatex(temp, 63, "%L", i,  "HUD_MESSAGE_ZB_DRAW", money_zb)
			}
			
			show_message(i, rgb_zb, 0.08, 0.5, temp)
			
			set_money(i, money_zb)
		}
		else
		{
			switch(message_index)
			{
				case 0: formatex(temp, 63, "%L", i, "HUD_MESSAGE_HUM_FAIL", money_hum)
				
				case 1: formatex(temp, 63, "%L", i, "HUD_MESSAGE_HUM_WIN", money_hum)
				
				case 2:  formatex(temp, 63, "%L", i, "HUD_MESSAGE_HUM_DRAW", money_hum)
			}
			
			show_message(i, rgb_hum, 0.08, 0.5, temp)
			
			set_money(i,money_hum)			
		}
	}	
}
		
public set_money(id, value)
{
	new money=zp_cs_get_user_money(id)+value
		
	money=amx_clamp(money, (get_user_flags(id)&ADMIN_LEVEL)?LIMIT_ADMIN:LIMIT)
		
	zp_cs_set_user_money(id, money)
}

stock amx_clamp(value, maximum)
	return value>maximum?maximum:value
	

stock show_message(id, const rgb[3], Float:x, Float:y, const message[])
{

	set_dhudmessage(rgb[0],rgb[1] ,rgb[2], x, y , 0)
	
	show_dhudmessage(id, message)
	show_dhudmessage(id, message)
}
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 22:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

02 Dec 2013, 17:29

Nimeni :)) , phai daca ma ajuta cineva postez si restul resurselor aici :D si explic ce e :|
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
User avatar
Deevix
Membru, skill +1
Membru, skill +1
Posts: 191
Joined: 10 Aug 2013, 22:17
Detinator Steam: Nu
CS Status: Zombie
Location: Summoner's Rift
Has thanked: 14 times
Been thanked: 5 times
Contact:

04 Dec 2013, 01:31

T/C nu mai am nevoie . l-am facut altfel de la 0.
Image

ZOMBIE MOD3 LIKE BETA V1.0 (BASED ON ZP) (89%) [PRIVAT]
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: Google [Bot] and 19 guests