Raised This Month: $ Target: $400
 0% 

help new round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-13-2007 , 10:42   help new round
Reply With Quote #1

i have this public:
Code:
public streamfunc(index)
{
    new g_r = random(256)
    new g_b = random(256)
    new g_g = random(256)
    
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)    
    
    write_byte(22)
    
    write_short(index)    
    
    write_short( spr )
    
    write_byte(200)
    write_byte(8)
    
    write_byte(g_r)
    write_byte(g_b)
    write_byte(g_g)
    
    write_byte(100)    
    
    message_end()
}
And also i have an "ResetHUD" event. I want to disable that stream on reset hud . How i can do that ?
I tryed with this:
Code:
public stopstr(index)
{ 
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)    
    
    write_byte(22)
    
    write_short(index)    
    
    write_short( 0 )
    
    write_byte(200)
    write_byte(8)
    
    write_byte(0)
    write_byte(0)
    write_byte(0)
    
    write_byte(100)    
    
    message_end()
}
But doesent works .

Hope you are understand, thanks
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
gzus
Member
Join Date: Jan 2007
Old 02-13-2007 , 10:56   Re: help new round
Reply With Quote #2

are u trying to have this msg be displayed every new round? im not the best coder, but the only was i can get stuff to display every round is with the hook hud option.

PHP Code:
public plugin_init()

register_plugin(PLUGINVERSIONAUTHOR
register_event("ResetHUD""hook_hud""b")
 } 
//------------------------------------------------------------------------------------------- 
public hook_hud(id)

server_print("-- DEBUGGED BY CODE -- [hooking hud]",0.01
//maybe this is where u call your stopstr ?? 
stopstr(index
return 
PLUGIN_HANDLED
 

im not possative, but this seems like it should work.
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com

Last edited by gzus; 02-13-2007 at 10:59.
gzus is offline
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 02-13-2007 , 10:59   Re: help new round
Reply With Quote #3

in message_const.inc (location: amxmodx/scripting/include/) you can find a function to destroy the followbeam

#define TE_KILLBEAM 99 // Kill all beams attached to entity
// write_byte(TE_KILLBEAM)
// write_short(entity)

so in code it should be:

Code:
public stopstr(index){
     message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
     write_byte(99)
     write_short(index)
     message_end()
}
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
gzus
Member
Join Date: Jan 2007
Old 02-13-2007 , 11:01   Re: help new round
Reply With Quote #4

oh never mind then i misread you, i honestly have no clue how to kill the beams like that, never used them, sorry
__________________
71.200.20.142:27017 - testing mho mod
if you need any files visit clan.mosthatedonline.com
gzus is offline
SAMURAI16
BANNED
Join Date: Sep 2006
Old 02-13-2007 , 11:24   Re: help new round
Reply With Quote #5

thanks SSJ2GOKU it's works
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
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 00:43.


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