Raised This Month: $319 Target: $400
 79%   Almost there!

leave only the bomb


Post New Thread Reply   
 
Thread Tools Display Modes
ZaX
Senior Member
Join Date: Jan 2015
Old 07-04-2020 , 09:37   Re: leave only the bomb
Reply With Quote #31

The check must be on all the functions where it contains checks for armoury_entity or weaponbox

Code:
if(equali(classname,"weaponbox") && get_pdata_int(ent, 105, 4))
if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox) && get_pdata_int(weaponbox, 105, 4))
if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1 && get_pdata_int(ent, 105, 4))
if(containi(classname,"armoury")!=-1 && get_pdata_int(ent, 105, 4))

Last edited by ZaX; 07-04-2020 at 09:39.
ZaX is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 09:43   Re: leave only the bomb
Reply With Quote #32

he asked for "Only C4 is spinning and render" so I think the only place needed is FM_SetModel.
force_spin and newgame is for armory is not needed since C4 is on player when round start.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 09:44.
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 10:39   Re: leave only the bomb
Reply With Quote #33

here is the original plugin, it works modelki spin and glow, but when I enter as you said
Code:
if (equali(classname,"bIsBomb") & & get_pdata_bool(ent, 105, 4))
then modelki all spin again and without illumination
Code:
/*
*   _______     _      _  __          __
*  | _____/    | |    | | \ \   __   / /
*  | |         | |    | |  | | /  \ | |
*  | |         | |____| |  | |/ __ \| |
*  | |   ___   | ______ |  |   /  \   |
*  | |  |_  |  | |    | |  |  /    \  |
*  | |    | |  | |    | |  | |      | |
*  | |____| |  | |    | |  | |      | |
*  |_______/   |_|    |_|  \_/      \_/
*
*
*
*  Last Edited: 12-31-07
*
*  ============
*   Changelog:
*  ============
*
*  v2.0
*    -Added color to floating weapons
*
*  v1.0
*    -Initial Release
*
*/

#define VERSION	"2.0"

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fun>

new maxplayers
new speed_pcvar
new toggle_pcvar

public plugin_init()
{
	register_plugin("UT Style Floating Weapons",VERSION,"GHW_Chronic")

	speed_pcvar = register_cvar("FW_speed","25.0")
	toggle_pcvar = register_cvar("FW_enabled","1")

	register_forward(FM_SetModel,"W_Model_Hook",1)
	register_touch("weaponbox","worldspawn","touch")
	set_task(1.0,"newgame")

	set_task(0.1,"force_spin",0,"",0,"b")

	maxplayers = get_maxplayers()
}

public W_Model_Hook(ent,model[])
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(ent))
	{
		static classname[32]
		pev(ent,pev_classname,classname,31)
		if(equali(classname,"weaponbox"))
		{
			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})
			}
			static Float:angles[3]
			pev(ent,pev_angles,angles)
			angles[0] -= 90.0
			angles[1] += 45.0
			set_pev(ent,pev_angles,angles)
		}
	}
}

public touch(weaponbox,worldspawn)
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox))
	{
		
		set_pev(weaponbox,pev_movetype,MOVETYPE_FLY)
		static Float:origin[3]
		pev(weaponbox,pev_origin,origin)
		origin[2] += 30.0
		set_pev(weaponbox,pev_origin,origin)
	}
}

public force_spin()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[16], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,15)
				if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1)
				{
					pev(ent,pev_angles,angles)
					angles[1] += get_pcvar_float(speed_pcvar) / 10.0
					if(angles[1]>=180.0)
					{
						angles[1] -= 360.0
					}
					set_pev(ent,pev_angles,angles)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}

public newgame()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[8], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,7)
				if(containi(classname,"armoury")!=-1)
				{
					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})
					}
					pev(ent,pev_angles,angles)
					angles[0] -= 90.0
					angles[1] += 45.0
					set_pev(ent,pev_angles,angles)
					touch(ent,0)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}

Last edited by jonny1990; 07-04-2020 at 10:41.
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 10:57   Re: leave only the bomb
Reply With Quote #34

Because you change
Code:
equali(classname,"weaponbox")
to
Code:
equali(classname,"bIsBomb")

which there is no classname "bIsBomb". So ofc it can't detect anything => it does nothing.

That why I said, you replace this whole line:
Code:
if(equali(classname,"weaponbox")) //or this in your code if (equali(classname,"bIsBomb") & & get_pdata_bool(ent, 105, 4))
to
Code:
if(equali(classname,"weaponbox") && get_pdata_bool(ent, 105, 4))

I even highlight that part for you to replace and you still sturbon and didn't replace it then said it didn't work.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 11:03.
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 11:07   Re: leave only the bomb
Reply With Quote #35

I did everything as you said, but it doesn't work
OK if not is obtained the leave, thank you who tried to help
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 11:11   Re: leave only the bomb
Reply With Quote #36

Code:
/*
*   _______     _      _  __          __
*  | _____/    | |    | | \ \   __   / /
*  | |         | |    | |  | | /  \ | |
*  | |         | |____| |  | |/ __ \| |
*  | |   ___   | ______ |  |   /  \   |
*  | |  |_  |  | |    | |  |  /    \  |
*  | |    | |  | |    | |  | |      | |
*  | |____| |  | |    | |  | |      | |
*  |_______/   |_|    |_|  \_/      \_/
*
*
*
*  Last Edited: 12-31-07
*
*  ============
*   Changelog:
*  ============
*
*  v2.0
*    -Added color to floating weapons
*
*  v1.0
*    -Initial Release
*
*/

#define VERSION	"2.0"

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fun>

new maxplayers
new speed_pcvar
new toggle_pcvar

public plugin_init()
{
	register_plugin("UT Style Floating Weapons",VERSION,"GHW_Chronic")

	speed_pcvar = register_cvar("FW_speed","25.0")
	toggle_pcvar = register_cvar("FW_enabled","1")

	register_forward(FM_SetModel,"W_Model_Hook",1)
	register_touch("weaponbox","worldspawn","touch")
	set_task(1.0,"newgame")

	set_task(0.1,"force_spin",0,"",0,"b")

	maxplayers = get_maxplayers()
}

public W_Model_Hook(ent,model[])
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(ent))
	{
		static classname[32]
		pev(ent,pev_classname,classname,31)
		if(equali(classname,"weaponbox") && get_pdata_bool(ent, 420, 4))
		{
			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})
			}
			static Float:angles[3]
			pev(ent,pev_angles,angles)
			angles[0] -= 90.0
			angles[1] += 45.0
			set_pev(ent,pev_angles,angles)
		}
	}
}

public touch(weaponbox,worldspawn)
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox))
	{
		
		set_pev(weaponbox,pev_movetype,MOVETYPE_FLY)
		static Float:origin[3]
		pev(weaponbox,pev_origin,origin)
		origin[2] += 30.0
		set_pev(weaponbox,pev_origin,origin)
	}
}

public force_spin()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[16], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,15)
				if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1)
				{
					pev(ent,pev_angles,angles)
					angles[1] += get_pcvar_float(speed_pcvar) / 10.0
					if(angles[1]>=180.0)
					{
						angles[1] -= 360.0
					}
					set_pev(ent,pev_angles,angles)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}

public newgame()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[8], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,7)
				if(containi(classname,"armoury")!=-1)
				{
					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})
					}
					pev(ent,pev_angles,angles)
					angles[0] -= 90.0
					angles[1] += 45.0
					set_pev(ent,pev_angles,angles)
					touch(ent,0)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}
Just take it and end this bs.
I don't want to be toxic but you don't even try. I just give up on you.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 11:21.
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 11:18   Re: leave only the bomb
Reply With Quote #37

Quote:
Originally Posted by Celena Luna View Post
Code:
/*
*   _______     _      _  __          __
*  | _____/    | |    | | \ \   __   / /
*  | |         | |    | |  | | /  \ | |
*  | |         | |____| |  | |/ __ \| |
*  | |   ___   | ______ |  |   /  \   |
*  | |  |_  |  | |    | |  |  /    \  |
*  | |    | |  | |    | |  | |      | |
*  | |____| |  | |    | |  | |      | |
*  |_______/   |_|    |_|  \_/      \_/
*
*
*
*  Last Edited: 12-31-07
*
*  ============
*   Changelog:
*  ============
*
*  v2.0
*    -Added color to floating weapons
*
*  v1.0
*    -Initial Release
*
*/

#define VERSION	"2.0"

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fakemeta>
#include <fun>

new maxplayers
new speed_pcvar
new toggle_pcvar

public plugin_init()
{
	register_plugin("UT Style Floating Weapons",VERSION,"GHW_Chronic")

	speed_pcvar = register_cvar("FW_speed","25.0")
	toggle_pcvar = register_cvar("FW_enabled","1")

	register_forward(FM_SetModel,"W_Model_Hook",1)
	register_touch("weaponbox","worldspawn","touch")
	set_task(1.0,"newgame")

	set_task(0.1,"force_spin",0,"",0,"b")

	maxplayers = get_maxplayers()
}

public W_Model_Hook(ent,model[])
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(ent))
	{
		static classname[32]
		pev(ent,pev_classname,classname,31)
		if(equali(classname,"weaponbox") && get_pdata_bool(ent, 105, 4))
		{
			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})
			}
			static Float:angles[3]
			pev(ent,pev_angles,angles)
			angles[0] -= 90.0
			angles[1] += 45.0
			set_pev(ent,pev_angles,angles)
		}
	}
}

public touch(weaponbox,worldspawn)
{
	if(get_pcvar_num(toggle_pcvar) && pev_valid(weaponbox))
	{
		
		set_pev(weaponbox,pev_movetype,MOVETYPE_FLY)
		static Float:origin[3]
		pev(weaponbox,pev_origin,origin)
		origin[2] += 30.0
		set_pev(weaponbox,pev_origin,origin)
	}
}

public force_spin()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[16], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,15)
				if(containi(classname,"armoury")!=-1 || containi(classname,"weaponbox")!=-1)
				{
					pev(ent,pev_angles,angles)
					angles[1] += get_pcvar_float(speed_pcvar) / 10.0
					if(angles[1]>=180.0)
					{
						angles[1] -= 360.0
					}
					set_pev(ent,pev_angles,angles)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}

public newgame()
{
	if(get_pcvar_num(toggle_pcvar))
	{
		static ent, classname[8], Float:angles[3]
		ent = engfunc(EngFunc_FindEntityInSphere,maxplayers,Float:{0.0,0.0,0.0},4800.0)
		while(ent)
		{
			if(pev_valid(ent))
			{
				pev(ent,pev_classname,classname,7)
				if(containi(classname,"armoury")!=-1)
				{
					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})
					}
					pev(ent,pev_angles,angles)
					angles[0] -= 90.0
					angles[1] += 45.0
					set_pev(ent,pev_angles,angles)
					touch(ent,0)
				}
			}
			ent = engfunc(EngFunc_FindEntityInSphere,ent,Float:{0.0,0.0,0.0},4800.0)
		}
	}
}
Just take it and end this bs.
I don't want to be toxic but you don't even try. I just give up on you.
I took your code, it doesn't work I tell you, I did the same
all types of weapons in the air and without illumination

Last edited by jonny1990; 07-04-2020 at 11:20.
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 11:23   Re: leave only the bomb
Reply With Quote #38



You want only bomb or something else?

Edit: The offset was 420, not 105.
So it should be
Code:
if(equali(classname,"weaponbox") && get_pdata_bool(ent, 420, 4))
but it seem like it is not what you want.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 11:26.
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 11:29   Re: leave only the bomb
Reply With Quote #39

Quote:
Originally Posted by Celena Luna View Post

You want only bomb or something else?
I just want a bomb
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 11:30   Re: leave only the bomb
Reply With Quote #40

Quote:
Originally Posted by jonny1990 View Post
I just want a bomb
Like in the image I used?
all other types of weapons won't have illumination?
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 11:32.
Celena Luna is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:57.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode