bonus box zombie

Cereri de pluginuri noi, skinuri in CS, etc.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
Giovanni ZM
Membru, skill +1
Membru, skill +1
Posts: 107
Joined: 26 Nov 2017, 15:57
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

16 Dec 2017, 05:52

Descriere plugin cerut: Sa fie diferite "cufere" pe mapa

Cuferele sa le ia atat ZOMBIE, cat si OAMANII
In cufere sa primeasca

50 ammo si sa scrie in chat
[RO]Cufarul ti-a adus 50 amo
[EN] You win 50 ammo

50 points, sa scrie in chat.

30 HP/AP, sa scrie in chat.

Alte informatii: Multumesc frumos
RoyalServer 2
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5137
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

16 Dec 2017, 07:36

cereri-pluginuri/cerere-plugin-bonus-box-zombie-t328583.html?hilit=bonus%20box%20zombie
Giovanni ZM
Membru, skill +1
Membru, skill +1
Posts: 107
Joined: 26 Nov 2017, 15:57
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

16 Dec 2017, 07:42

nu-i ceea ce am cerut eu e mult mai complicat acela ..

eu doresc doar 2 Beneficii in bonus box

+50 ammo

+50 points..
User avatar
Victor eXtream
Membru, skill +1
Membru, skill +1
Posts: 163
Joined: 19 Oct 2017, 09:36
Detinator Steam: Da
Fond eXtream: 0

18 Dec 2017, 13:13

Giovanni ZM wrote:nu-i ceea ce am cerut eu e mult mai complicat acela ..

eu doresc doar 2 Beneficii in bonus box

+50 ammo

+50 points..
Pai daca ai sursa .sma eu nu vad de ce nu ai putea sa modifici singur pe bunul plac cat ammo si points sa dea.
Giovanni ZM
Membru, skill +1
Membru, skill +1
Posts: 107
Joined: 26 Nov 2017, 15:57
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Contact:

18 Dec 2017, 15:27

am incercat da nu mi-a iesit.
User avatar
A k c 3 n 7
Super moderator
Super moderator
Posts: 5137
Joined: 25 Aug 2014, 21:31
Detinator Steam: Da
CS Status: who dares wins
SteamID: Jandarmeria
Reputatie: Super moderator
Moderatorul anului 2023
Fost Membru Club eXtreamCS ( o luna )
Fost eXtream Mod
Fost Intermediar
Nume anterior: Sorinel
Fond eXtream: 0
Location: Unknown
Discord: remusakcent
Has thanked: 4 times
Been thanked: 46 times

18 Dec 2017, 16:54

momentan l-am facut doar pentru ammo, uite cum arata
| Afiseaza codul
/*
Name: [ZP] Addon: Bonus Box
Author: PomanoB & STRELOK
Version 1.0

Based on [ZP] DM Item's by PomanoB
*/

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <fakemeta_util>
#include <zombieplague>
#include <hamsandwich>

#define PLUGIN "[ZP] Addon: Bonus Box"
#define VERSION "1.0"
#define AUTHOR "PomanoB & Accelerator"

#define OFFSET_FLASH_AMMO 387
#define OFFSET_HE_AMMO 388
#define OFFSET_SMOKE_AMMO 389

new const item_class_name[] = "dm_item"

new g_models[][] = {"models/zombie_plague/presents.mdl"}

public plugin_precache()
{
	for (new i = 0; i < sizeof g_models; i++)
		precache_model(g_models)	
}

public plugin_init()
{
	register_plugin(PLUGIN, VERSION, AUTHOR)
	
	register_forward(FM_Touch, "fwd_Touch")
	
	register_event("HLTV", "round_start", "a", "1=0", "2=0")
	
	RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
	
	register_dictionary("bonus_box.txt")
}

public fwd_Touch(toucher, touched)
{
	if (!is_user_alive(toucher) || !pev_valid(touched))
		return FMRES_IGNORED
	
	new classname[32]	
	pev(touched, pev_classname, classname, 31)
	if (!equal(classname, item_class_name))
		return FMRES_IGNORED
	
	
	
	give_item(toucher)
	set_pev(touched, pev_effects, EF_NODRAW)
	set_pev(touched, pev_solid, SOLID_NOT)
	
	return FMRES_IGNORED
	
}

public fw_PlayerKilled(victim, attacker, shouldgib)
{
	if (!is_user_connected(attacker) || !is_user_connected(victim) || attacker == victim || !attacker)
		return HAM_IGNORED
	
	
//	new random = random_num(0, 8)
	
//	if (random == 1 || random == 4 || random == 6)
        
        else
	{
		new origin[3]
		get_user_origin(victim, origin, 0)
		
		addItem(origin)
	}
	
	return HAM_IGNORED
}

public removeEntity(ent)
{
	if (pev_valid(ent))
		engfunc(EngFunc_RemoveEntity, ent)
}

public addItem(origin[3])
{
	new ent = fm_create_entity("info_target")
	set_pev(ent, pev_classname, item_class_name)
	
	engfunc(EngFunc_SetModel,ent, g_models[random_num(0, sizeof g_models - 1)])

	set_pev(ent,pev_mins,Float:{-10.0,-10.0,0.0})
	set_pev(ent,pev_maxs,Float:{10.0,10.0,25.0})
	set_pev(ent,pev_size,Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
	engfunc(EngFunc_SetSize,ent,Float:{-10.0,-10.0,0.0},Float:{10.0,10.0,25.0})

	set_pev(ent,pev_solid,SOLID_BBOX)
	set_pev(ent,pev_movetype,MOVETYPE_FLY)
	
	new Float:fOrigin[3]
	IVecFVec(origin, fOrigin)
	set_pev(ent, pev_origin, fOrigin)
	
	set_pev(ent,pev_renderfx,kRenderFxGlowShell)
	switch(random_num(1,4))
	{
		case 1: set_pev(ent,pev_rendercolor,Float:{0.0,0.0,255.0})
		case 2: set_pev(ent,pev_rendercolor,Float:{0.0,255.0,0.0})
		case 3: set_pev(ent,pev_rendercolor,Float:{255.0,0.0,0.0})
		case 4: set_pev(ent,pev_rendercolor,Float:{255.0,255.0,255.0})
	}
}

public give_item(id)
{
//	new zombie 
//	zombie = zp_get_user_zombie(id)
	
//	new i = random_num(0, (zombie ? 5 : 13))
	switch (id)
	{
		case 0:
		{
			zp_set_user_ammo_packs(id, zp_get_user_ammo_packs(id) + 50 )
			ChatColor(id, "!g[ZP]!y %L", LANG_PLAYER, "ITEM_DM_AMMOPACKS_UP")
		}	
		
	}
}
public round_start()
{
	new ent = FM_NULLENT
	static string_class[] = "classname"
	while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, item_class_name))) 
		set_pev(ent, pev_flags, FL_KILLME)
}

// Stock: ChatColor!
stock ChatColor(const id, const input[], any:...)
{
	new count = 1, players[32]
	static msg[191]
	vformat(msg, 190, input, 3)
	
	replace_all(msg, 190, "!g", "^4") // Green Color
	replace_all(msg, 190, "!y", "^1") // Default Color
	replace_all(msg, 190, "!team", "^3") // Team Color
	replace_all(msg, 190, "!team2", "^0") // Team2 Color
	
	if (id) players[0] = id; else get_players(players, count, "ch")
	{
		for (new i = 0; i < count; i++)
		{
			if (is_user_connected(players))
			{
				message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players)
				write_byte(players);
				write_string(msg);
				message_end();
			}
		}
	}
}
daca vrei si points imi trebuiesc nativele
Post Reply

Return to “Cereri”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests