This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

Make this only for HE


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
proffs
Senior Member
Join Date: Jul 2013
Old 03-22-2014 , 11:04   Make this only for HE
Reply With Quote #1

I have this code which is for all the nades:

PHP Code:
register_think("grenade""GrenadeThink"
PHP Code:
public GrenadeThink(iEnt
{
    if(
GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS)
        return 
PLUGIN_HANDLED
        
    
return PLUGIN_CONTINUE

I want it only be for HE nade like my old code:

PHP Code:
public think_grenadeent 
{    
    if( 
GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS 
    { 
        new 
model[32];
        
entity_get_string(entEV_SZ_modelmodel31)
        
        if(
equali(model,"models/w_dodgeball.mdl")) 
        {
            return 
PLUGIN_CONTINUE
            
        
}
            
        
// stop grenade from blowing up
        
return PLUGIN_HANDLED
        
    
}
    
    return 
PLUGIN_CONTINUE;

proffs is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-22-2014 , 15:22   Re: Make this only for HE
Reply With Quote #2

Ctrl+C & Ctrl+V seems to solve it.
I don't understand at all.
Could you explain what you want help with?
__________________

Last edited by Black Rose; 03-22-2014 at 15:22.
Black Rose is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-22-2014 , 15:31   Re: Make this only for HE
Reply With Quote #3

Quote:
Originally Posted by Black Rose View Post
Ctrl+C & Ctrl+V seems to solve it.
I don't understand at all.
Could you explain what you want help with?
The first code is a bit optimized. and the second one is rubbish.
proffs is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-22-2014 , 15:36   Re: Make this only for HE
Reply With Quote #4

Code:
if(GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS && entity_get_int(iEnt, EV_INT_modelindex) == 216)
?

215: Flashbang
216: HE
228: Smoke
__________________

Last edited by Black Rose; 03-22-2014 at 15:38.
Black Rose is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-22-2014 , 15:45   Re: Make this only for HE
Reply With Quote #5

Quote:
Originally Posted by Black Rose View Post
Code:
if(GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS && entity_get_int(iEnt, EV_INT_modelindex) == 216)
?

215: Flashbang
216: HE
228: Smoke

So this is right?

PHP Code:
public GrenadeThink(iEnt)  

    if(
GAME_DGBALL <= g_iCurrentGame <= GAME_ZMBOMBS && entity_get_int(iEntEV_INT_modelindex) == 216)
        return 
PLUGIN_HANDLED 
         
    
return PLUGIN_CONTINUE 

EDIT: sometimes it blows the HE doesn't work properly

Last edited by proffs; 03-22-2014 at 16:02.
proffs is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-22-2014 , 17:11   Re: Make this only for HE
Reply With Quote #6

Add this line before everything else
Code:
server_print("%d <= %d <= %d && %d == 216", GAME_DGBALL, g_iCurrentGame, GAME_ZMBOMBS, entity_get_int(iEnt, EV_INT_modelindex));
When it doesn't work, copy the text from server console and print it here.
__________________

Last edited by Black Rose; 03-22-2014 at 18:18.
Black Rose is offline
proffs
Senior Member
Join Date: Jul 2013
Old 03-22-2014 , 17:48   Re: Make this only for HE
Reply With Quote #7

Quote:
Originally Posted by Black Rose View Post
Add this line before everything else
Code:
server_print("%d <= %d <= %d && %d == 216", GAME_DGBALL, g_iCurrentGame <= GAME_ZMBOMBS, entity_get_int(iEnt, EV_INT_modelindex));
When it doesn't work, copy the text from server console and print it here.
Code:
 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
proffs is offline
Black Rose
Veteran Member
Join Date: Feb 2011
Location: Stockholm, Sweden
Old 03-22-2014 , 18:18   Re: Make this only for HE
Reply With Quote #8

Quote:
Originally Posted by proffs View Post
Code:
 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:26: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:26: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:26: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:26: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
L 03/22/2014 - 21:47:27: [AMXX] Run time error 25: parameter error 
L 03/22/2014 - 21:47:27: [AMXX]    [0] now.sma::GrenadeThink (line 651)
L 03/22/2014 - 21:47:27: String formatted incorrectly - parameter 5 (total 4)
L 03/22/2014 - 21:47:27: [AMXX] Displaying debug trace (plugin "now.amxx")
Sorry, fixed that format error.
__________________
Black Rose 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 18:29.


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