Raised This Month: $ Target: $400
 0% 

Need Help Creating an Pluging


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
holy-mod.de
New Member
Join Date: Oct 2007
Location: 1> Fatal Error God.ci
Old 10-13-2007 , 17:03   Need Help Creating an Pluging
Reply With Quote #1

PHP Code:
#include <sourcemod>
#include <sdktools>

public Plugin:myinfo 
{
    
name "RoundSound",
    
author "TanaToS",
    
description "Play Round End Sounds",
    
version "1.0",
    
url "http://www.holy-mod.de/"
}

public 
OnPluginStart()
{
    
g_hEnabled CreateConVar("rs_ver""1.0""The Version of RoundSound")
    
RSEnabled()
}
RSEnabled()
{
    
LogMessage("RoundSound: Start | At (%i)"GetTime());
    
LogMessage("RoundSound: Enabled | At (%i)"GetTime());

PHP Code:
// es_RoundSound by TanaToS
// Sounds By PaintLancer
// ES CODE by TanaToS
//----------------------------------------------------------------
// ORIGINAL AMXX SRC CODE
//----------------------------------------------------------------
//RoundSound.amxx -by PaintLancer
//
//#include <amxmodx>
//
//public plugin_init()
//{
//  register_plugin("RoundSound","1.0","PaintLancer")
//  register_event("SendAudio", "t_win", "a", "2&%!MRAD_terwin")
//  register_event("SendAudio", "ct_win", "a", "2&%!MRAD_ctwin")
//}
//
//public t_win()
//{
//  new rand = random_num(0,2)
//
//  client_cmd(0,"stopsound")
//
//  switch(rand)
//  {
//    case 0: client_cmd(0,"spk misc/twinnar")
//    case 1: client_cmd(0,"spk misc/twinnar2")
//    case 2: client_cmd(0,"spk misc/twinnar3")
//  }
//
//  return PLUGIN_HANDLED
//}
//
//public ct_win()
//{
//  new rand = random_num(0,2)
//
//  client_cmd(0,"stopsound")
//
//  switch(rand)
//  {
//    case 0: client_cmd(0,"spk misc/ctwinnar2")
//    case 1: client_cmd(0,"spk misc/ctwinnar3")
//    case 2: client_cmd(0,"spk misc/ctwinnar4")
//  }
//
//  return PLUGIN_HANDLED
//}
//
//public plugin_precache()
//{
//  precache_sound("misc/ctwinnar2.wav")
//  precache_sound("misc/ctwinnar3.wav")
//  precache_sound("misc/ctwinnar4.wav")
//  precache_sound("misc/twinnar.wav")
//  precache_sound("misc/twinnar2.wav")
//  precache_sound("misc/twinnar3.wav")
//
//  return PLUGIN_CONTINUE
//}
//----------------------------------------------------------------
// ES CODE by TanaToS
//----------------------------------------------------------------
block load
{
        
es_xset es_RoundSound "RoundSound -- 2.0 -- TanaToS"
        
es_xmakepublic es_RoundSound
}

event round_end
{
        if(
event_var(winner) == 2then es_xset rw 2
        
if(event_var(winner) == 3then es_xset rw 3
        es_xset rs 0
        es_xrand rs 1 3
        
if(server_var(rw) == 2) do
        {
                if(
server_var(rs) == 1) do
                {
                        
es_xcexec_all playgamesound misc/twinnar.wav
                
}
                if(
server_var(rs) == 2) do
                {
                        
es_xcexec_all playgamesound misc/twinnar2.wav
                
}
                if(
server_var(rs) == 3) do
                {
                        
es_xcexec_all playgamesound misc/twinnar3.wav
                
}
        }
        if(
server_var(rw) == 3) do
        {
                
es_xset rw 3
                
if(server_var(rs) == 1) do
                {
                        
es_xcexec_all playgamesound misc/ctwinnar2.wav
                
}
                if(
server_var(rs) == 2) do
                {
                        
es_xcexec_all playgamesound misc/ctwinnar3.wav
                
}
                if(
server_var(rs) == 3) do
                {
                        
es_xcexec_all playgamesound misc/ctwinnar4.wav
                
}
        }
}
event es_map_start
{
        
downloadable "sound/misc/ctwinnar2.wav"
        
downloadable "sound/misc/ctwinnar3.wav"
        
downloadable "sound/misc/ctwinnar4.wav"
        
downloadable "sound/misc/twinnar.wav"
        
downloadable "sound/misc/twinnar2.wav"
        
downloadable "sound/misc/twinnar3.wav"

I have an plugin remake from AMXX at ES but now i dont know how i can make it one SMX and "EmitSoundToAll("radio/terwin.wav");" that is the that plays sound
__________________
holy-mod.de is offline
Send a message via ICQ to holy-mod.de Send a message via MSN to holy-mod.de
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 16:56.


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