Raised This Month: $ Target: $400
 0% 

Request resolving plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
LoLeX[*]
New Member
Join Date: Aug 2008
Old 08-03-2008 , 08:46   Request resolving plugin
Reply With Quote #1

Hy guys.Am a problem with a plugin created by the mine.Plugin consists in announcing the round with sound Fight.Din Unfortunately when we compile the plugin I show two errors.The content of the plugin below.

Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <csx>

#define PLUGIN "Fight"
#define VERSION "1.0"
#define AUTHOR "#LoLeX[*]"

new g_Round;
public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_event("HLTV","new_round","a","1=0","2=0");
}
public plugin_precache() {
    register_sound("misc/fight.wav")
}

public new_round()
{
    new players[32],num,index;
    get_players(players,num);
    for(new i = 0;i < num;i++) {
    index = players[i];
    if(!is_user_connected(index)) continue;
    set_hudmessage(255, 0, 255, -1.0, -1.0, 0, 6.0, 12.0);
    show_hudmessage(0, "FighT!^nRound: %d",g_Round);
    client_cmd(0,"spk fight")
}
Photograph of errors.


apologize for my English but I understand too well with English.
__________________

LoLeX[*] is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 08-03-2008 , 08:55   Re: Request resolving plugin
Reply With Quote #2

register_sound doesn't exist. -> precache_sound().

And the second error, you forget an '}' . Easy to find.
__________________
Arkshine is offline
Old 08-03-2008, 08:57
ot_207
This message has been deleted by ot_207. Reason: :)) 2 fast for me arkshine
LoLeX[*]
New Member
Join Date: Aug 2008
Old 08-03-2008 , 09:01   Re: Request resolving plugin
Reply With Quote #3

The first error resolved.Dar where we put "}" I searched and I found the code but I do not know where bring "}".
__________________

LoLeX[*] is offline
jim_yang
Veteran Member
Join Date: Aug 2006
Old 08-03-2008 , 09:05   Re: Request resolving plugin
Reply With Quote #4

put } at the end
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Dores
Veteran Member
Join Date: Jun 2008
Location: You really don't wanna k
Old 08-03-2008 , 09:06   Re: Request resolving plugin
Reply With Quote #5

In case you didn't understood arkshine:
PHP Code:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <amxmisc>
#include <csx>

#define PLUGIN "Fight"
#define VERSION "1.0"
#define AUTHOR "#LoLeX[*]"

new g_Round;
public 
plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
register_event("HLTV","new_round","a","1=0","2=0");
}
public 
plugin_precache() {
    
precache_sound("misc/fight.wav")
}

public 
new_round()
{
    new 
players[32],num,index;
    
get_players(players,num);
    for(new 
0;num;i++) {
        
index players[i];
        if(!
is_user_connected(index)) continue;
        
set_hudmessage(2550255, -1.0, -1.006.012.0);
        
show_hudmessage(0"FighT!^nRound: %d",g_Round);
        
client_cmd(0,"spk fight")
    }

Sorry if i'm wrong with where the "for loop" ends
__________________
O o
/Ż________________________
| IMMA FIRIN' MAH LAZOR!!!
\_ŻŻŻ
Dores is offline
LoLeX[*]
New Member
Join Date: Aug 2008
Old 08-03-2008 , 09:13   Re: Request resolving plugin
Reply With Quote #6

Thanks guys.Resolved.
__________________

LoLeX[*] 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 05:30.


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