Raised This Month: $ Target: $400
 0% 

Warmup+Music =)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-16-2015 , 11:32   Warmup+Music =)
Reply With Quote #1

Hello! Ifound one nice Plugin... But That compile with errors... Where is the problem?

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <dhudmessage>
#include <hamsandwich>
#include <fun>
 
new TimerSecondsCvar
new bool:g_knife true
 
public plugin_init()
{
    
register_plugin"Auto rr" "1.0""ill" )
    
    
register_event("DeathMsg""on_death""a")
    
register_event"CurWeapon""EventCurWeapon""be""2!29" )
    
   
RegisterHam(Ham_Spawn"player""fw_PlayerSpawn_Post"1)
    
    
SecondsCvar register_cvar("auto_rr_time","60")
 
    
Timer get_pcvar_num(SecondsCvar)
    
set_task(1.0"start_rr_timer"___"a"Timer)
}
 
public 
plugin_precache()
{
   
precache_sound("misc/warmup.mp3")
}
 
public 
fw_PlayerSpawn_Post(id)
{
   if(!
is_user_alive(id))
        return
       
   if(
g_knife)
      
set_user_health(id35)
}
 
public 
on_death()
{
   new 
victim
   victim 
read_data(2)
    
   if(
g_knife)
      
set_task(1.0"fnRevivePlayer"victim)
}
 
public 
client_putinserver(id)
{
   if(
g_knife)
      
set_task(3.0"Start_sound"id)
}
 
public 
Start_sound(id)
{
   if(
g_knife)
   {
      
client_cmd(id"mp3 play sound/misc/warmup.mp3")
      if(!
is_user_alive(id) && (get_user_team(id) == || get_user_team(id) == 2) ) 
         
ExecuteHamB(Ham_CS_RoundRespawnid)
   }
}
 
public 
fnRevivePlayer(id
{
   if(!
is_user_alive(id)) 
      
ExecuteHamB(Ham_CS_RoundRespawnid)
}
 
public 
EventCurWeapon(id)
{
   if(
g_knife
      
engclient_cmd(id"weapon_knife")
}
 
public 
start_rr_timer()
{
    
Timer--
     
    
set_dhudmessage(135206235, -1.00.0800.00.01)
    
show_dhudmessage(0"WarmUp!^nRestart after %d seconds"Timer)
 
    if(
Timer 1)
    {
      
server_cmd("sv_restartround 1")
      
set_task(3.0"rr_end")
      
client_cmd(0"mp3 stop");
      
g_knife false
    
}
}
 
public 
rr_end()
{
    
set_dhudmessagerandom_num(0255), random_num(0255), random_num(0255), -1.00.7826.03.00.11.5false )
    
show_dhudmessage(0"LIVE! LIVE! LIVE!")

nooberlin is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 06-17-2015 , 03:56   Re: Warmup+Music =)
Reply With Quote #2

Errors ?
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-18-2015 , 14:10   Re: Warmup+Music =)
Reply With Quote #3

Quote:
Originally Posted by indraraj striker View Post
Errors ?
nooberlin is offline
indraraj striker
Veteran Member
Join Date: Mar 2014
Location: Under the water
Old 06-20-2015 , 03:11   Re: Warmup+Music =)
Reply With Quote #4

ignore this error
or

if you are using amxx studio open the sma and press ctrl + I then save it
or

put this on your sma
#pragma tabsize 0
then compile
__________________
Thanks everyone. #miss_you_all
indraraj striker is offline
nooberlin
Junior Member
Join Date: Jun 2015
Old 06-20-2015 , 07:32   Re: Warmup+Music =)
Reply With Quote #5

Thanx! Works!
nooberlin 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 03:26.


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