Counter-Strike 1.6
VIP
Cs-PlovdiV.com - Aim Attack
93.123.16.4:27022
aim_aztec
Играчи: 0/16
aim_aztec
Counter-Strike 1.6
VIP
93.123.16.4:27022 Cs-PlovdiV.com - Aim Attack aim_aztec 0/16

plugin vip box

В този раздел можете да подавате всякакви заявки за намиране, изработка или преработка на плъгини/модове.
Аватар
GGzBoy
Извън линия
Foreigner
Foreigner
Мнения: 63
Регистриран на: 28 Мар 2020, 16:42
Се отблагодари: 16 пъти
Получена благодарност: 1 път

plugin vip box

Мнение от GGzBoy » 12 Юни 2020, 00:43

good night i would like to ask if anyone can turn this plugin into a box that when someone picks it up on the map wins vip for a certain day and flag
cvar where you can adjust the time that was on the map
adjustable flag
the player can only take 1 box until his vip ends

Код за потвърждение: Избери целия код

/* Plugin generated by AMXX-Studio */

#include < amxmodx >
#include < engine >
#include < fakemeta_util >
#include < cstrike >
#include < colorchat>

#define PLUGIN "Bonus Box"
#define VERSION "1.0"
#define AUTHOR "MegastorM"

#define TASK_BONUS 1234

new modell[] = { "models/box/w_bonus.mdl" }
new const szPrefix[15] = "[AMXX]"
new g_sprite
new Float:OriginZrtve[3], Float:Uglovi[3] 

public plugin_init() {
	register_plugin(PLUGIN, VERSION, AUTHOR)
	register_event("DeathMsg", "event_death", "ade");
	register_touch("BonusBox", "player",  "touchbox");
	// Add your code here...
}

public plugin_precache()
{
	precache_model(modell)
	g_sprite = precache_model("sprites/box/box_sprite.spr")
	precache_sound("box/supplybox.wav")
	precache_sound("box/touched.wav")
}

public event_death()
{
	new victim = read_data(2)
	if(is_user_connected(victim))
	{
		get_origin(victim)
		
		set_task(0.1,"create_bonusbox",TASK_BONUS)
	}
}

public get_origin(id)
{
	pev(id, pev_origin, OriginZrtve)
	pev(id, pev_angles, Uglovi)
	Uglovi[0] = 0.0
}

public create_bonusbox()
{
	new ent = create_entity("info_target")
	
	entity_set_origin(ent, OriginZrtve)
	entity_set_string(ent, EV_SZ_classname, "BonusBox")
	entity_set_model(ent, modell)
	set_rendering ( ent, kRenderFxGlowShell, random_num(128,255),random_num(128,255),random_num(128,255), kRenderFxNone, 255 )
	emit_sound(ent, CHAN_ITEM, "box/supplybox.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
	entity_set_int(ent, EV_INT_solid, SOLID_BBOX)
	entity_set_int(ent, EV_INT_movetype, MOVETYPE_PUSHSTEP)
	
	entity_set_size(ent,Float:{-2.0,-2.0,-2.0},Float:{5.0,5.0,5.0})
	
	drop_to_floor(ent)
	
	engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, OriginZrtve, 0)
	write_byte(TE_BEAMCYLINDER) // TE id
	engfunc(EngFunc_WriteCoord, OriginZrtve[0]) // x
	engfunc(EngFunc_WriteCoord, OriginZrtve[1]) // y
	engfunc(EngFunc_WriteCoord, OriginZrtve[2]) // z
	engfunc(EngFunc_WriteCoord, OriginZrtve[0]) // x axis
	engfunc(EngFunc_WriteCoord, OriginZrtve[1]) // y axis
	engfunc(EngFunc_WriteCoord, OriginZrtve[2]+385.0) // z axis
	write_short(g_sprite) // sprite
	write_byte(0) // startframe
	write_byte(0) // framerate
	write_byte(4) // life
	write_byte(30) // width
	write_byte(0) // noise
	write_byte(250) // red
	write_byte(0) // green
	write_byte(0) // blue
	write_byte(200) // brightness
	write_byte(0) // speed
	message_end()
}

public touchbox(ent, toucher)
{
	if (!is_user_alive(toucher) || !pev_valid(ent))
		return FMRES_IGNORED
	
	new classname[32]	
	pev(ent, pev_classname, classname, 31)
	if (!equal(classname, "BonusBox"))
		return FMRES_IGNORED
	
	meni_za_potvrdu(toucher)
	
	emit_sound(toucher, CHAN_ITEM, "box/touched.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
	
	set_pev(ent, pev_effects, EF_NODRAW)
	set_pev(ent, pev_solid, SOLID_NOT)
	remove_ent(ent)
	return FMRES_IGNORED
	
}

public meni_za_potvrdu(id)
{
	new szItem[32]
	new menu = menu_create("Quieres abrir nuestra caja sorpresa?","Box_H");
	
	formatex(szItem,charsmax(szItem),"\ySi")
	menu_additem(menu, szItem)
	
	formatex(szItem,charsmax(szItem),"\dNo")
	menu_additem(menu,szItem)
	menu_display(id,menu);
}

public Box_H(id, menu, item)
{	
	switch(item)
	{
		case 0:
		{
			switch(random_num(1, 13))
			{
				case 1:
				{
					set_pev(id, pev_effects, pev(id, pev_effects) | EF_BRIGHTLIGHT)
					fm_give_item(id, "weapon_deagle")
					cs_set_user_bpammo(id, CSW_DEAGLE,35)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 Desert Eagle+Aura",szPrefix)
				}
				case 2:
				{
					fm_give_item(id, "weapon_ak47")
					cs_set_user_bpammo(id, CSW_AK47,90)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 AK47",szPrefix)
				}
				case 3:
				{
					fm_give_item(id, "weapon_m4a1")
					cs_set_user_bpammo(id, CSW_M4A1,90)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 M4A1",szPrefix)
				}
				case 4:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 Por desgracia, no recibio nada, mejor suerte la proxima vez",szPrefix)
				}
				case 5:
				{
					fm_give_item(id, "weapon_sg550")
					cs_set_user_bpammo(id, CSW_SG550,90)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 SG550",szPrefix)
				}
				case 6:
				{
					fm_give_item(id, "weapon_g3sg1")
					cs_set_user_bpammo(id, CSW_G3SG1,90)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 G3SG1",szPrefix)
				}
				case 7:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 Por desgracia, no recibio nada, mejor suerte la proxima vez",szPrefix)
				}
				case 8:
				{
					fm_set_user_health(id, get_user_health(id)+250)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 +250HP",szPrefix)
				}
				case 9:
				{
					fm_set_user_health(id, get_user_health(id)+500)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 +500HP",szPrefix)
				}
				case 10:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 Por desgracia, no recibio nada, mejor suerte la proxima vez",szPrefix)
				}
				case 11:
				{
					cs_set_user_money(id, cs_get_user_money(id)+1000)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 +1000$",szPrefix)
				}
				case 12:
				{
					cs_set_user_money(id, cs_get_user_money(id)+5000)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Recibiste^3 +5000$",szPrefix)
				}
				case 13:
				{
					cs_set_user_money(id, 0)
					ColorChat(id, TEAM_COLOR, "^4%s^1 Por desgracia, perdiste^3 todo el dinero",szPrefix)
				}
			}
		}
		case 1:
		{
			switch(random_num(1,3))
			{
				case 1:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 La caja era buena, pero no aceptaste!",szPrefix)
				}
				case 2:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 No tengas miedo, no te moriras si aceptas!",szPrefix)
				}
				case 3:
				{
					ColorChat(id, TEAM_COLOR, "^4%s^1 No has tomado una sorpresa!",szPrefix)
				}
				
			}
		}
		
	}
	return PLUGIN_CONTINUE;
}

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


Последно издигане GGzBoy от 12 Юни 2020, 00:43

  • Подобни теми
    Отговори
    Преглеждания
     Последно мнение

Обратно към “Заявки за плъгини”

Кой е на линия

Потребители разглеждащи този форум: 0 регистрирани и 5 госта