Raised This Month: $12 Target: $400
 3% 

leave only the bomb


Post New Thread Reply   
 
Thread Tools Display Modes
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 03:47   Re: leave only the bomb
Reply With Quote #21

I can't believe you can't even copy and paste...

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
if(equali(classname,"weaponbox") && get_pdata_bool(ent1054)) //Check if the entity is weapon box and if it is a bomb or not. (m_bIsBomb = 105) 
Quote:
Originally Posted by jonny1990 View Post
Code:
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,"bIsBomb") && get_pdata_bool(ent, 105, 4))
        {
__________________
My plugin:

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

Quote:
Originally Posted by Celena Luna View Post
I can't believe you can't even copy and paste...
I copied and pasted, it doesn't work like that, all the weapons are spinning and the backlight is gone
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 04:39   Re: leave only the bomb
Reply With Quote #23

Saw where I highlight? that is where you should copy MY WHOLE CODE and REPLACE THAT LINE
__________________
My plugin:
Celena Luna is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 06:15   Re: leave only the bomb
Reply With Quote #24

Quote:
Originally Posted by Celena Luna View Post
Saw where I highlight? that is where you should copy MY WHOLE CODE and REPLACE THAT LINE
I replaced it, it doesn’t work, if you don’t know how, don’t write here
jonny1990 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2020 , 06:25   Re: leave only the bomb
Reply With Quote #25

Quote:
Originally Posted by jonny1990 View Post
I replaced it, it doesn’t work, if you don’t know how, don’t write here
Being rude to people that obviously know more than you and put up with your lack of knowledge and mistakes, people that really tried to help you is not the way to go.
No one will help you with that attitude.
__________________
HamletEagle is offline
jonny1990
Senior Member
Join Date: Apr 2020
Old 07-04-2020 , 06:35   Re: leave only the bomb
Reply With Quote #26

Quote:
Originally Posted by HamletEagle View Post
Being rude to people that obviously know more than you and put up with your lack of knowledge and mistakes, people that really tried to help you is not the way to go.
No one will help you with that attitude.
if a person knew, he would have already laid out a ready-made solution and not drove around
jonny1990 is offline
ZaX
Senior Member
Join Date: Jan 2015
Old 07-04-2020 , 07:32   Re: leave only the bomb
Reply With Quote #27

This is scripting help section, not requesting section.
He gave you what you needed, its very simple, yet you dont know how to use it. I suggest you to post in here

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

Original Code:
Spoiler


what I told you to change

Quote:
Originally Posted by Celena Luna View Post
PHP Code:
if(equali(classname,"weaponbox") && get_pdata_bool(ent1054)) //Check if the entity is weapon box and if it is a bomb or not. (m_bIsBomb = 105) 
what you change

Quote:
Originally Posted by jonny1990 View Post
Code:
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,"bIsBomb") && get_pdata_bool(ent, 105, 4))
        {
yeah, obviously it is my fault for not fixing it for you but giving you hints to work with.

I even give you the answer, you don't even know how to paste into the plugin.

Like I said, if you don't know how to code, put your request on Request Section

I already highlighted where you should be changed in the [Original Code] part. There is no way I could do more than that other than just give you the plugins directly with only 1 line change.

Quote:
Originally Posted by v3x View Post
- This forum is NOT for suggestions, requests, additions, edits, et cetera. Please do so in Suggestions / Requests.
I really want to give you the fixed plugin from that start but I can't because this is Scripting Help where people got stuck while writing/coding asking for the way to write or fix it, not asking to do something for them.
__________________
My plugin:

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

Quote:
Originally Posted by Celena Luna View Post
Original Code:


what I told you to change



what you change



yeah, obviously it is my fault for not fixing it for you but giving you hints to work with.

I even give you the answer, you don't even know how to paste into the plugin.

Like I said, if you don't know how to code, put your request on Request Section

I already highlighted where you should be changed in the [Original Code] part. There is no way I could do more than that other than just give you the plugins directly with only 1 line change.



I really want to give you the fixed plugin from that start but I can't because this is Scripting Help where people got stuck while writing/coding asking for the way to write or fix it, not asking to do something for them.
I tell you again, I wrote what you said - it does not work!
jonny1990 is offline
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 07-04-2020 , 09:02   Re: leave only the bomb
Reply With Quote #30

Quote:
Originally Posted by jonny1990 View Post
I tell you again, I wrote what you said - it does not work!
Put the plugin here again. I don't have psyshic to know what you wrote.

Quote:
Originally Posted by jonny1990 View Post
Code:
#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,"bIsBomb") && 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)
		}
	}
}
If the code from this post then it is wrong.
__________________
My plugin:

Last edited by Celena Luna; 07-04-2020 at 09:05.
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 02:37.


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