Raised This Month: $ Target: $400
 0% 

No C4 crash


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-20-2015 , 14:02   No C4 crash
Reply With Quote #1

I have the following script in the plugin:
PHP Code:
#include <fakemeta_util>

register_event("StatusIcon""GotBomb""be""1=1""1=2""2=c4")

public 
GotBomb(id){
    
fm_strip_user_gun(idCSW_C4)

I have basebuilder server and i use this to remove c4 given to zombies and it works well but sometimes server crashes with the error debugging this line
fm_strip_user_gun(id, CSW_C4)

I tried everything , to remove info_bomb_target and info_bomb_blablabla ,bomb was given to player at round start. ONly strip user gun removes properly c4 but it crashes server sometimes.

Last edited by siriusmd99; 09-20-2015 at 14:03.
siriusmd99 is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-20-2015 , 14:27   Re: No C4 crash
Reply With Quote #2

Read this thread.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-20-2015 , 14:52   Re: No C4 crash
Reply With Quote #3

Quote:
Originally Posted by wickedd View Post
I have read it 100 times , did like that and doesnt work.Tried to delete info_bomb_target and another one entity because arkshine said that bomb wouldnt respawn if there is no info_bmb_target but bomb respawns.
siriusmd99 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-20-2015 , 14:57   Re: No C4 crash
Reply With Quote #4

Delete func_bomb_target & info_bomb_target entities, bomb won't be given again. When RestartRound is called there is a check for m_bMapHasBombTarget. If true GiveC4 is called, otherwise no one get the bomb. m_bMapHasBombTarget is filled like:
PHP Code:
if (UTIL_FindEntityByClassname(NULL"func_bomb_target") != NULL)
    {
        
m_bMapHasBombTarget true;
        
m_bMapHasBombZone   true;
    }
    else if (
UTIL_FindEntityByClassname(NULL"info_bomb_target") != NULL)
    {
        
m_bMapHasBombTarget true;
        
m_bMapHasBombZone   false;
    }
    else
    {
        
m_bMapHasBombTarget false;
        
m_bMapHasBombZone   false;
    } 
So you see, removing them make the trick.
__________________

Last edited by HamletEagle; 09-20-2015 at 14:58.
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-20-2015 , 15:05   Re: No C4 crash
Reply With Quote #5

Quote:
Originally Posted by HamletEagle View Post
Delete func_bomb_target & info_bomb_target entities, bomb won't be given again. When RestartRound is called there is a check for m_bMapHasBombTarget. If true GiveC4 is called, otherwise no one get the bomb. m_bMapHasBombTarget is filled like:
PHP Code:
if (UTIL_FindEntityByClassname(NULL"func_bomb_target") != NULL)
    {
        
m_bMapHasBombTarget true;
        
m_bMapHasBombZone   true;
    }
    else if (
UTIL_FindEntityByClassname(NULL"info_bomb_target") != NULL)
    {
        
m_bMapHasBombTarget true;
        
m_bMapHasBombZone   false;
    }
    else
    {
        
m_bMapHasBombTarget false;
        
m_bMapHasBombZone   false;
    } 
So you see, removing them make the trick.
Show me how to delete these 2 targets because i tried but bomb is given .

Last edited by siriusmd99; 09-20-2015 at 15:09.
siriusmd99 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-20-2015 , 15:07   Re: No C4 crash
Reply With Quote #6

No, the code is to show you that if you remove the entities the c4 won't be given, it's c++ code from cssdk. Just find all info_bomb_target and func_bomb_target entities and remove them.
__________________
HamletEagle is offline
siriusmd99
Veteran Member
Join Date: Oct 2013
Location: Republic of Moldova
Old 09-20-2015 , 15:11   Re: No C4 crash
Reply With Quote #7

Quote:
Originally Posted by HamletEagle View Post
No, the code is to show you that if you remove the entities the c4 won't be given, it's c++ code from cssdk. Just find all info_bomb_target and func_bomb_target entities and remove them.
I tried with arkshine code from other topic but doesnt work.
Can you give me the right code?

I tried with plugin_cfg from this topic , from Alka's and ConnorMcLeod's posts but doesnt work :
https://forums.alliedmods.net/showthread.php?t=61685

Last edited by siriusmd99; 09-20-2015 at 15:12.
siriusmd99 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 09-21-2015 , 07:42   Re: No C4 crash
Reply With Quote #8

Quote:
Originally Posted by siriusmd99 View Post
I tried with arkshine code from other topic but doesnt work.
Can you give me the right code?

I tried with plugin_cfg from this topic , from Alka's and ConnorMcLeod's posts but doesnt work :
https://forums.alliedmods.net/showthread.php?t=61685
Are you testing alone?
__________________
HamletEagle is offline
wickedd
Veteran Member
Join Date: Nov 2009
Old 09-20-2015 , 15:38   Re: No C4 crash
Reply With Quote #9

PHP Code:
// Is map contain bomb targets?
    
if (fm_find_ent_by_class(-1"func_bomb_target") || fm_find_ent_by_class(-1"info_bomb_target"))
 
// How to remove bomb targets?
    
new target = -1classname[] = "func_bomb_target"
    
while ((target fm_find_ent_by_class(targetclassname)))
    
fm_remove_entity(target)
    
classname "info_bomb_target"
    
while ((target fm_find_ent_by_class(targetclassname)))
    
fm_remove_entity(target
That code removes the targets, so the bomb will not be given to a player.
__________________
Just buy the fucking game!!!!
I hate No-Steamers and lazy ass people.
wickedd is offline
Hartmann
Senior Member
Join Date: Nov 2014
Old 09-20-2015 , 15:47   Re: No C4 crash
Reply With Quote #10

https://forums.alliedmods.net/showpo...43&postcount=5
__________________

RETAKES v1.0
github.com/alghtryer/retakes

Contact : [email protected]

BTC Donate: 1QAh1NLmeHy81LF9r8PaeGjYqHL2BBcJTx

Hartmann is offline
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 22:06.


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