Raised This Month: $ Target: $400
 0% 

new berserker == berserker


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 12-17-2009 , 17:39   Re: new berserker == berserker
Reply With Quote #10

Quote:
Originally Posted by Mxnn View Post
I get it..
PHP Code:
public Berserker_Start( )
{
           
set_hudmessage02000, -1.00.2926.012.00.10.2, -)
           
show_hudmessage0"BERSERKER MOD: ENABLE" )
           new 
players32 ], num
           get_players
(playersnum"a")
           
// I don't know why you are asking for alive players if when you enable the mod you are restarting the server..
           
new_berserker playersrandom_num(1num ) ]
           
NewBerseker(new_berseker)
 
    return 
PLUGIN_HANDLED
}
 
public 
Event_DeathMsg( )
{
     if ( 
get_pcvar_numpcvar_berserker_toggle ) == )
     {
         new 
id read_data)
         
cooldown_timeid ] = get_pcvar_numcvar_respawndelay )
         
set_taskget_pcvar_floatcvar_respawndelay ), "Respawn_Player"id )
         
set_task1.0"ShowHUD"id,  __"a"cooldown_timeid ] )
     }
 
     if ( 
get_pcvar_numpcvar_berserker_toggle ) == )
         return 
PLUGIN_CONTINUE
 
 
     
if ( read_data) == new_berserker )
     {
         
new_berserker read_data)
         
NewBerseker(new_berseker)
     }
 
     return 
PLUGIN_CONTINUE
}
 
public 
NewBerseker(id) {
                     new 
name32 ]
                      
get_user_namenew_berserkername31 )
                      
set_user_renderingnew_berserkerkRenderFxGlowShell191239255kRenderNormal16 )
                      
set_user_healthnew_berserkerHEALTH )
                      
set_user_armornew_berserkerARMOR )
                      
set_user_gravitynew_berserkerGRAVITY )
                      
set_hudmessage20000, -1.00.2021.01.10.00.0, -)
                      
show_hudmessage0"BERSERKER: %s | HEALTH: %d | ARMOR: %d"nameget_user_healthnew_berserker ), get_user_armornew_berserker ) )
                      
emit_sound(  new_berserkerCHAN_STREAMBerserkerFound1.0ATTN_NORM0PITCH_HIGH )
 
    return 
PLUGIN_HANDLED

Thanks it works. But there 1 problem, the problem is during the round start there no berserker, how can i find the new berserker again ?

If i'm not wrong using the round start event function and get random person again ?
__________________
ƒa†es™ is offline
 



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:29.


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