Hier is mal der Code wie ich ihn mir vorstelle

Kann mir irgendwie sagen wie ich den Fehler im Plugin rausbekomm?
Ich bin für Verbesserungen, Wünsche, Fehlerbehebungen,... sehr dankbar
Code:
/* *********************************************************
* This plugin was created by: @vus
* Plugin created: ------------> 2002-05-12 <---------------
* avus@facs-clan.de
* http://www.facs-clan.de
* *********************************************************/
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_ADMIN 8 //Nötiges Recht
#define TIMER_DELAY 20 //Zeit die vergeht vom connecten bis zur Teamauswahl (20sek)
new SoundFile[MAX_DATA_LENGTH] = "misc\hitler.wav"; //Sounddatei die abgespielt werden soll
new STRING_VERSION[MAX_DATA_LENGTH] = "1.0";
/* *********************************************************
* | DAS HERZ |
* *********************************************************/
public plugin_init() {
plugin_registerinfo("Admin Sound","This Plugin Play a Sound on all AdminClients when a Admin joins",STRING_VERSION);
return PLUGIN_CONTINUE;
}
public plugin_connect(HLUserName, HLIP, UserIndex){
new strName[MAX_NAME_LENGTH];
convert_string(HLUserName, strName, MAX_NAME_LENGTH);
set_timer("check_admin",TIMER_DELAY, 1, strName);
return PLUGIN_CONTINUE;
}
public check_admin(Timer,Repeat,HLName,HLParam){
new strName[MAX_NAME_LENGTH];
convert_string(HLParam,strName,MAX_NAME_LENGTH);
if (access(ACCESS_ADMIN, strName)!=0){ //Ist der User ein Admin?
centersay("Ein Admin ist auf den Server gekommen!",7, 255, 0, 0);
playfile(SoundFile);
}
}
playfile( sFileName[ ] )
{
new Name[ MAX_NAME_LENGTH ];
new iUserID;
new iWONID;
new maxplayers = maxplayercount();
for( new i = 1; i <= maxplayers; i++ )
{
if( playerinfo(i, Name, MAX_NAME_LENGTH, iUserID, iWONID ) ) {
//if its not a bot
if( iWONID != 0 ) {
if(access(ACCESS_ADMIN, Name)!= 0){ //Ist der User ein Admin
playsound(Name, sFileName );
}
}
}
}
return PLUGIN_CONTINUE;
}
_________________
cy@ @vus
Life suxx, aber die Grafik ist geil
