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

What dose those codes do


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 08-06-2020 , 07:26   Re: What dose those codes do
Reply With Quote #11

Doing this:

Code:
// Prevent some entities from spawning g_fwSpawn = register_forward(FM_Spawn, "fw_Spawn") unregister_forward(FM_Spawn, g_fwSpawn)

is the same as doing this:

Code:
//

Yes, the code is empty on purpose.

"unregister_forward" doesn't prevent entities from spawning, it removes the hook from your plugin and you're no longer able to detect their spawn with the callback function.

Basically, doing unregister right after register is the same as not doing anything at all.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-06-2020 , 10:43   Re: What dose those codes do
Reply With Quote #12

@ DJEarthQuake - What if i changed it to set_task and adding it to cfg and spawn section, i will have the same thing ?
@ OciXCrom - Okay, i have understand thx
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-06-2020 , 13:06   Re: What dose those codes do
Reply With Quote #13

There is no need to set task when the line I added accomplishes wiping c4 from first round already.
__________________
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-06-2020 , 13:47   Re: What dose those codes do
Reply With Quote #14

Quote:
Originally Posted by DJEarthQuake View Post
There is no need to set task when the line I added accomplishes wiping c4 from first round already.
Ye but you added this server cmd("sv_restart round 1") and i don't want my server to restart round.
But if there's no way to do it then it's okay thank you
Supremache is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-06-2020 , 14:06   Re: What dose those codes do
Reply With Quote #15

PHP Code:
RemoveC4(bool:bRemove)
{
        new 
iEnt = -1

        
while((iEnt engfunc(EngFunc_FindEntityByString,iEnt,"classname",bRemove "func_bomb_target""_func_bomb_target")) > 0)
        {
                
set_pev(iEnt,pev_classname,bRemove "_func_bomb_target""func_bomb_target")
        }

        while((
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"bRemove "info_bomb_target""_info_bomb_target")) > 0)
        {
                
set_pev(iEnt,pev_classname,bRemove "_info_bomb_target""info_bomb_target")
        }

__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-06-2020 , 21:07   Re: What dose those codes do
Reply With Quote #16

Quote:
Originally Posted by iceeedr View Post
PHP Code:
RemoveC4(bool:bRemove)
{
        new 
iEnt = -1

        
while((iEnt engfunc(EngFunc_FindEntityByString,iEnt,"classname",bRemove "func_bomb_target""_func_bomb_target")) > 0)
        {
                
set_pev(iEnt,pev_classname,bRemove "_func_bomb_target""func_bomb_target")
        }

        while((
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname"bRemove "info_bomb_target""_info_bomb_target")) > 0)
        {
                
set_pev(iEnt,pev_classname,bRemove "_info_bomb_target""info_bomb_target")
        }

I need to regester event for this code or just add RemoveC4() in plugin inti
Supremache is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 08-07-2020 , 06:45   Re: What dose those codes do
Reply With Quote #17

Quote:
Originally Posted by Supremache View Post
Ye but you added this server cmd("sv_restart round 1") and i don't want my server to restart round.
But if there's no way to do it then it's okay thank you
When bots are present and the round restarts that's annoying. That does not occur here. It happens subtly during map load.
__________________

Last edited by DJEarthQuake; 08-07-2020 at 09:13. Reason: grammar
DJEarthQuake is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-07-2020 , 08:06   Re: What dose those codes do
Reply With Quote #18

Quote:
Originally Posted by DJEarthQuake View Post
When bots are present and the round restarts that annoying. That does not occur here. It happens subtly during map load.
Okay i will add your codes thanks for your help
Supremache is offline
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 08-12-2020 , 02:51   Re: What dose those codes do
Reply With Quote #19

Quote:
Originally Posted by DJEarthQuake View Post
When bots are present and the round restarts that's annoying. That does not occur here. It happens subtly during map load.
Those codes doing problems in my mod, like those code are disabling "logevent_roundend, msgroundend, client_death" So do you have another idea for removing c4 bomb ?
Supremache is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 08-12-2020 , 07:28   Re: What dose those codes do
Reply With Quote #20

Quote:
Originally Posted by Supremache View Post
I need to regester event for this code or just add RemoveC4() in plugin inti
Just call the function.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Reply



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 19:57.


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