Ein neues Thema erstellen  Auf das Thema antworten  [ 10 Beiträge ] 

Meinung zum plugin_stetze
ganz nützlich 78%  78%  [ 7 ]
das is ja irgendwie.... ne? (oleg) 22%  22%  [ 2 ]
totaler mist 0%  0%  [ 0 ]
Insgesamt abgegebene Stimmen: 9
Autor Nachricht
 Betreff des Beitrags: plugin_stetze update
BeitragVerfasst: 21.10.2001, 01:00 

Registriert: 21.10.2001, 01:00
Beiträge: 93
Moinsen!

Es gibt nun Version 0.4 meines Plugins. Es enthält ein paar mehr Einstellmöglichkeiten bezüglich der "Admin on Server"-Anzeige und außerdem hab ich ein paar Bugs gefixt.

Finden könnt ihr es hier:
plugins.php#plugin_stetze v 0.4 (updated)

Falls ihr irgendwelche weiteren Bugs findet, melden!!! :)

danke,
stetze


Zuletzt geändert von Stetze am 22.01.2002, 15:08, insgesamt 1-mal geändert.

Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 21.10.2001, 01:00 

Registriert: 21.10.2001, 01:00
Beiträge: 93
hab nochmal was hinzugefügt... man kann die variable admin_announcer in der vault.ini jetzt über die entsprechende admin mod funktion verändern.


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 21.01.2004, 17:18 
Benutzeravatar

Registriert: 15.10.2003, 17:34
Beiträge: 137
Wohnort: Nähe Karlsruhe
wo gekomme ich das plugin her der link geht nicht mehr


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 21.01.2004, 22:01 
AM.de Team
Benutzeravatar

Registriert: 23.11.2001, 00:00
Beiträge: 3842
Wohnort: Vor König Arthus
Von einem netten Admin. :)

Aber für die Funktionalität übernehme ich keine Verantwortung.


Dateianhänge:
plugin_stetze.zip [3.81 KiB]
292-mal heruntergeladen

_________________
Der schwarze Ritter triumphiert immer...
WING-Clan
Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 21.01.2004, 22:26 
Benutzeravatar

Registriert: 31.05.2003, 09:16
Beiträge: 790
damit MeiserEder nicht wieder schimpft,
hier ohne ERROR:
Code:
/*
*
* Plugin by Stetze -- Some little funcions
* $Id: plugin_stetze.sma , v 0.4 January 21st, 2002 $
* Contact: stetze2008@gmx.de / forum @ www.adminmod.de
*/

#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>

#define ACCESS_STETZE 1024
#define ACCESS_SERSET 32

#define USER_INVALID -1

new STRING_VERSION[MAX_DATA_LENGTH] = "0.4";

public HandleBSayVote(WinningOption,HLData,VoteCount,UserCount) {
        new ScriptData[MAX_DATA_LENGTH];
        new Text[MAX_TEXT_LENGTH];
        new strNumber[MAX_NUMBER_LENGTH];
        convert_string(HLData,ScriptData,MAX_DATA_LENGTH);

        if (WinningOption==1) {
                strcpy(Text, "Yes won, with ", MAX_TEXT_LENGTH);
                numtostr(VoteCount,strNumber);
                strcat(Text,strNumber,MAX_TEXT_LENGTH);
                strcat(Text," / ",MAX_TEXT_LENGTH);
                numtostr(UserCount,strNumber);
                strcat(Text,strNumber,MAX_TEXT_LENGTH);
                strcat(Text," votes.",MAX_TEXT_LENGTH);
                say(Text);
        } else {
                strcpy(Text, "No won, with ", MAX_TEXT_LENGTH);
                numtostr(VoteCount,strNumber);
                strcat(Text,strNumber,MAX_TEXT_LENGTH);
                strcat(Text," / ",MAX_TEXT_LENGTH);
                numtostr(UserCount,strNumber);
                strcat(Text,strNumber,MAX_TEXT_LENGTH);
                strcat(Text," votes.",MAX_TEXT_LENGTH);
                say(Text);
        }
}

public admin_warmap(HLCommand,HLData,HLUserName,UserIndex) {
  new Command[MAX_COMMAND_LENGTH];
  new Data[MAX_DATA_LENGTH];
  new User[MAX_NAME_LENGTH];
  convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
  convert_string(HLData,Data,MAX_DATA_LENGTH);
  convert_string(HLUserName,User,MAX_NAME_LENGTH);
  new i = 0;
  new sresult[MAX_TEXT_LENGTH];
  new found = 0;
  new lfound = 0;
  new warmap1[MAX_NAME_LENGTH]="";
  new Cmd[MAX_TEXT_LENGTH]="";
  new servercfgfile[20] = "server.cfg";
  new lservercfgfile[20] = "listenserver.cfg";
  strbreak(Data,warmap1,Cmd, MAX_NAME_LENGTH);

  if(warmap1[0] == NULL_CHAR) {
    selfmessage("War maps missing...!");
    return PLUGIN_HANDLED;
  }

  if(warmap1[0] == '0' ) {
    selfmessage("Setting mapcycle.txt as mapcyclefile...!");
    found = -1;
    lfound = -1;
    i = 1;
    while( readfile(servercfgfile, sresult, i, MAX_TEXT_LENGTH) ) {
      if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
           found = i;
      }
      i++;
    }
    writefile(servercfgfile, "mapcyclefile mapcycle.txt", found);
    i = 1;
    while( readfile(lservercfgfile, sresult, i, MAX_TEXT_LENGTH)) {
      if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
      lfound = i;
      }
      i++;
    }
    writefile(lservercfgfile, "mapcyclefile mapcycle.txt", lfound);
    exec("mapcyclefile mapcycle.txt");
    exec("mp_timelimit 0.1");
    return PLUGIN_HANDLED;
  }

  new cwcyclefile[20] = "cwcycle.txt";
  /* writefile(cwcyclefile, ""); */
  resetfile(cwcyclefile);
  new warmap2[MAX_NAME_LENGTH]= "";
  strbreak(Cmd, warmap2, Cmd, MAX_NAME_LENGTH);
  if(warmap2[0] == NULL_CHAR) {
    selfmessage("War map 2 missing... setting only war map 1!");
    writefile(cwcyclefile, warmap1);
    writefile(cwcyclefile, warmap1);
    found = -1;
    lfound = -1;
    i = 1;
    while( readfile(servercfgfile, sresult, i, MAX_TEXT_LENGTH) ) {
      if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
        found = i;
      }
      i++;
    }
    writefile(servercfgfile, "mapcyclefile cwcycle.txt", found);
    i = 1;
    while( readfile(lservercfgfile, sresult, i, MAX_TEXT_LENGTH) ) {
      if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
        lfound = i;
      }
      i++;
    }
    writefile(lservercfgfile, "mapcyclefile cwcycle.txt", lfound);
    exec("mapcyclefile cwcycle.txt");
    new sText[MAX_TEXT_LENGTH];
    strcpy  (sText, "War map set: ", MAX_TEXT_LENGTH);
    strcat  (sText, warmap1,MAX_TEXT_LENGTH);
    say     (sText);
    selfmessage("changing to the clanwar map...!");
    exec("mp_timelimit 0.1");
    return PLUGIN_HANDLED;
  }
  writefile(cwcyclefile, warmap1);
  writefile(cwcyclefile, warmap1);
  writefile(cwcyclefile, warmap2);
  writefile(cwcyclefile, warmap2);
  found = -1;
  lfound = -1;
  i = 1;
  while( readfile(servercfgfile, sresult, i, MAX_TEXT_LENGTH) ) {
    if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
      found = i;
    }
    i++;
  }
  writefile(servercfgfile, "mapcyclefile cwcycle.txt", found);
  i = 1;
  while( readfile(lservercfgfile, sresult, i, MAX_TEXT_LENGTH) ) {
    if ( strcasecmp(sresult, "mapcyclefile") >= 0 ) {
      lfound = i;
    }
    i++;
  }
  writefile(lservercfgfile, "mapcyclefile cwcycle.txt", lfound);
  exec("mapcyclefile cwcycle.txt");
  new Text[MAX_TEXT_LENGTH];
  strcpy (Text, "War maps set: ", MAX_TEXT_LENGTH);
  strcat  (Text, warmap1,MAX_TEXT_LENGTH);
  strcat  (Text, " and ",MAX_TEXT_LENGTH);
  strcat  (Text, warmap2,MAX_TEXT_LENGTH);
  say     (Text);
  selfmessage("changing to the first cw map!");
  exec("mp_timelimit 0.1");

  return PLUGIN_HANDLED;
}

/* coming soon

public admin_warsettings(HLCommand,HLData,HLUserName,UserIndex) {
    new Command[MAX_COMMAND_LENGTH];
    new Data[MAX_DATA_LENGTH];
    new User[MAX_NAME_LENGTH];
    new warsetting1[MAX_TEXT_LENGTH]="";
    new Cmd[MAX_TEXT_LENGTH]="";
    convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
    convert_string(HLData,Data,MAX_DATA_LENGTH);
    convert_string(HLUserName,User,MAX_NAME_LENGTH);
    strbreak(Data,warsetting1,Cmd, MAX_NAME_LENGTH);
    if(warsetting1[0] == NULL_CHAR || warsetting1[0] == 0) {
        message(User, "War settings missing...^nenabling default war settings!");
        exec("mp_friendlyfire 1");
        exec("mp_c4timer 45");
        exec("mp_footsteps 1");
        exec("");
        exec("");
        exec("");
        exec("");
        exec("mp_autokick 0");
        exec("mp_autoteambalance 0");
        exec("mp_fadetoblack 1");
        exec("mp_limitteams 0");
        exec("mp_tkpunish 0");
        return PLUGIN_HANDLED;
    }
    if(warsetting1[0] == 'x' || warsetting1[0] == 'X') {
       selfmessage("no new value set for mp_timelimit");
    }
    else execute_command(User,"mp_timelimit","mp_timelimit",warsetting1);

    new warsetting2[MAX_NAME_LENGTH]="";
    strbreak(Cmd, warsetting2, Cmd, MAX_NAME_LENGTH);
    if(warsetting2[0] == NULL_CHAR  || warsetting2[0] == 'x' || warsetting2[0] == 'X') {
       selfmessage("no new value set for mp_fadetoblack");
    }
    else execute_command(User,"mp_fadetoblack","mp_fadetoblack", warsetting2);

    new warsetting3[MAX_NAME_LENGTH]="";
    strbreak(Cmd, warsetting3, Cmd, MAX_NAME_LENGTH);
    if(warsetting3[0] == NULL_CHAR  || warsetting3[0] == 'x' || warsetting3[0] == 'X') {
       selfmessage("no new value set for mp_tkpunish");
    }
    else {
      execute_command(User,"mp_tkpunish","mp_tkpunish",warsetting3);
    }

    new warsetting4[MAX_NAME_LENGTH]="";
    strbreak(Cmd, warsetting4, Cmd, MAX_NAME_LENGTH);
    if(warsetting4[0] == NULL_CHAR  || warsetting4[0] == 'x' || warsetting4[0] == 'X') {
        selfmessage("no new value set for mp_autokick");
    }
    else execute_command(User,"mp_autokick","mp_autokick", warsetting4);

    new warsetting5[MAX_NAME_LENGTH]="";
    strbreak(Cmd, warsetting5, Cmd, MAX_NAME_LENGTH);
    if(warsetting5[0] == NULL_CHAR  || warsetting5[0] == 'x' || warsetting5[0] == 'X') {
       selfmessage("no new value set for mp_autoteambalance");
    }
    else execute_command(User,"mp_autoteambalance","mp_autoteambalance", warsetting5);

    new warsetting6[MAX_NAME_LENGTH]="";
    strbreak(Cmd, warsetting6, Cmd, MAX_NAME_LENGTH);
    if(warsetting6[0] == NULL_CHAR  || warsetting6[0] == 'x' || warsetting6[0] == 'X') {
        selfmessage("no new value set for mp_limitteams");
    }
    else execute_command(User,"mp_limitteams","mp_limitteams", warsetting6);
    say("Warsettings enabled!");
    return PLUGIN_HANDLED;
}

*/

public admin_hostsay(HLCommand,HLData,HLUserName,UserIndex) {
        new hname[50] = "";
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        getstrvar("hostname",hname,50);
        new Prefix[MAX_TEXT_LENGTH] = "";
        strcat(Prefix, hname, MAX_TEXT_LENGTH);
        strcat(Prefix, ": ", MAX_TEXT_LENGTH);
        strcat(Prefix, Data, MAX_TEXT_LENGTH);
        say(Prefix);
        return PLUGIN_HANDLED;
}

public admin_bsay(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        vote(Data,"Yes","No","HandleBSayVote",Data);
        return PLUGIN_HANDLED;
}

public admin_console(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        new Text[MAX_TEXT_LENGTH];
        new Text2[MAX_TEXT_LENGTH];
        new TargetName[MAX_NAME_LENGTH];
        if (check_user(Data)==1) {
                get_username(Data,TargetName,MAX_NAME_LENGTH);
                execclient(Data, "bind ` toggleconsole");
                execclient(Data, "console 1");
                execclient(Data, "toggleconsole");
                strcpy(Text, "Activating console for ", MAX_TEXT_LENGTH);
                strcat(Text, TargetName, MAX_TEXT_LENGTH);
                strcat(Text, ".", MAX_TEXT_LENGTH);
                selfmessage(Text);
                strcpy(Text2, "Hello ", MAX_TEXT_LENGTH);
                strcat(Text2, TargetName, MAX_TEXT_LENGTH);
                strcat(Text2, "! This is the Console!", MAX_TEXT_LENGTH);
                message(TargetName, Text2);
                message(TargetName, "Use the ~ key to toggle this on and off.");
                message(TargetName, "You can type commands here to do many things.");
        } else {
                message(User,"Unrecognized user name ");
                message(User,Data);
        }
        return PLUGIN_HANDLED;
}

/* server setting commands as AM commands */

public admin_spectators(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"allow_spectators",Data);
        return PLUGIN_HANDLED;
}

public admin_autokick(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_autokick",Data);
        return PLUGIN_HANDLED;
}

public admin_teambalance(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_autoteambalance",Data);
        return PLUGIN_HANDLED;
}

public admin_buytime(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_buytime",Data);
        return PLUGIN_HANDLED;
}

public admin_c4timer(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_c4timer",Data);
        return PLUGIN_HANDLED;
}

public admin_chattime(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_chattime",Data);
        return PLUGIN_HANDLED;
}

public admin_fadetoblack(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_fadetoblack",Data);
        return PLUGIN_HANDLED;
}

public admin_forcechasecam(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_forcechasecam",Data);
        return PLUGIN_HANDLED;
}

public admin_flashlight(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_flashlight",Data);
        return PLUGIN_HANDLED;
}

public admin_footsteps(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_footsteps",Data);
        return PLUGIN_HANDLED;
}

public admin_freezetime(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_freezetime",Data);
        return PLUGIN_HANDLED;
}

public admin_hpenalty(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_hostagepenalty",Data);
        return PLUGIN_HANDLED;
}

public admin_limitteams(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_limitteams",Data);
        return PLUGIN_HANDLED;
}

public admin_maxrounds(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_maxrounds",Data);
        return PLUGIN_HANDLED;
}

public admin_playerid(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_playerid",Data);
        return PLUGIN_HANDLED;
}

public admin_roundtime(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_roundtime",Data);
        return PLUGIN_HANDLED;
}

public admin_tkpunish(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_tkpunish",Data);
        return PLUGIN_HANDLED;
}

public admin_winlimit(HLCommand,HLData,HLUserName,UserIndex) {
        new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        execute_command(User,Command,"mp_winlimit",Data);
        return PLUGIN_HANDLED;
}

public admin_announcer(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
        new Data[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        new Text[MAX_TEXT_LENGTH];
        new VaultData[MAX_DATA_LENGTH];
        convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
        convert_string(HLData,Data,MAX_DATA_LENGTH);
        convert_string(HLUserName,User,MAX_NAME_LENGTH);
        if(Data[0] == 0) {
        	get_vaultdata("admin_announcer",VaultData[0], MAX_DATA_LENGTH);
        	snprintf(Text, MAX_TEXT_LENGTH, "[ADMIN] admin_announcer is set to %s", VaultData[0]);
        	selfmessage(Text);
        }
        else if(Data[0] == '0' || Data[0] == '1' || Data[0] == '2') {
		set_vaultdata("admin_announcer", Data);
        	snprintf(Text, MAX_TEXT_LENGTH, "[ADMIN] admin_announcer set to %s", Data);
        	selfmessage(Text);
        }
        else {
        	selfmessage("Ungültiger Wert für admin_announcer");
        }
        return PLUGIN_HANDLED;
}


/* end of server settings commands */

public HandleSay(HLCommand, HLData, HLUserName, UserIndex)
{
        new Command[MAX_COMMAND_LENGTH];
        new Speech[MAX_DATA_LENGTH];
        new User[MAX_NAME_LENGTH];
        new Text[MAX_DATA_LENGTH];
        new CText[MAX_TEXT_LENGTH];
        new C1Text[MAX_TEXT_LENGTH] = "============================================================";
        new C2Text[MAX_TEXT_LENGTH];
        new i;
        new maxplayers = maxplayercount();
        new Name[MAX_NAME_LENGTH];
        new SessionID;
        new Team;
        new WONID;
        new VaultData[MAX_DATA_LENGTH];
        new SpeechTxt[MAX_DATA_LENGTH];

        convert_string(HLCommand, Command, MAX_COMMAND_LENGTH);
        convert_string(HLData, Speech, MAX_DATA_LENGTH);
        convert_string(HLUserName, User, MAX_NAME_LENGTH);
        if(get_vaultdata("admin_announcer",VaultData[0], MAX_DATA_LENGTH) != 0) {
          if(VaultData[0] != '0') {
        	strstripquotes(Speech);
        	snprintf(Text, MAX_DATA_LENGTH, "Admins on server:");
        	snprintf(CText, MAX_TEXT_LENGTH, "These Admins are currently on this server:");
                if ( (strcasestr(Speech, "admin") != -1)  || (strcasestr(Speech, "moderator") != -1) ) {
      			for(i=1; i<=maxplayers; i++) {
             			strinit(Name);
              			if(playerinfo(i,Name,MAX_NAME_LENGTH,SessionID,WONID,Team)==1) {
                			if(access(ACCESS_BAN,Name)!=0) {
                  				strcat(Text," ",MAX_DATA_LENGTH);
                  				strcat(CText," ",MAX_TEXT_LENGTH);
                  				strcat(Text,Name,MAX_DATA_LENGTH);
                  				strcat(CText,Name,MAX_TEXT_LENGTH);
                			}
              			}
            		}
            		if(VaultData[0] == '2') {
            			snprintf(SpeechTxt, MAX_DATA_LENGTH, "admin_command admin_speakall administration announcement");
                        	exec(SpeechTxt);
                        }
            		typesay(Text,10,0,255,0);
            		snprintf(C2Text, MAX_TEXT_LENGTH, "plugin_stetze v. %s \n Visit Admin-Mod.de - plugins, help, etc.", STRING_VERSION);
          		for(i=1; i<=maxplayers; i++) {
          			strinit(User);
          			if(playerinfo(i,User,MAX_NAME_LENGTH,SessionID,WONID,Team)==1) {
          				messageex(User,C1Text,print_console);
          				messageex(User,"",print_console);
          				messageex(User,CText,print_console);
          				messageex(User,"",print_console);
          				messageex(User,C2Text,print_console);
          				messageex(User,"",print_console);
          				messageex(User,C1Text,print_console);
          			}
          		}
          	}
          }
        }
        else {
          set_vaultdata("admin_announcer", "2");
        }
        return PLUGIN_CONTINUE;
}

public plugin_init() {
        plugin_registerinfo("Stetze's Plugin","Some little functions.",STRING_VERSION);

        plugin_registercmd("admin_warmap","admin_warmap",ACCESS_STETZE,"admin_warmap <map1> <map2>: Sets 1 or 2 maps for clanwar.");
       /* plugin_registercmd("admin_warsettings","admin_warsettings",ACCESS_STETZE,"admin_warsettings <timelimit> <fadetoblack> <tkpunish> <autokick> <autoteambalance> <limitteams>: Settings for cw."); */
        plugin_registercmd("admin_hostsay","admin_hostsay",ACCESS_STETZE,"admin_hostsay <msg>: Prints out a message like 'rcon say'.");
        plugin_registercmd("admin_bsay","admin_bsay",ACCESS_STETZE,"admin_bsay <question> - Starts voting for a specified question.");
        plugin_registercmd("admin_console","admin_console",ACCESS_STETZE,"admin_console <user> - Toggles on console for a specified user.");
        plugin_registercmd("admin_tkpunish","admin_tkpunish",ACCESS_SERSET,"admin_tkpunish <1 or 0> - mp_tkpunish on or off.");
        plugin_registercmd("admin_spectators","admin_spectators",ACCESS_SERSET,"admin_spectators <#> - setting for allow_spectators");
        plugin_registercmd("admin_autokick","admin_autokick",ACCESS_SERSET,"admin_autokick <1 or 0> - mp_autokick on or off");
        plugin_registercmd("admin_teambalance","admin_teambalance",ACCESS_SERSET,"admin_teambalance <#> - setting for mp_autoteambalance");
        plugin_registercmd("admin_buytime","admin_buytime",ACCESS_SERSET,"admin_buytime <#> - setting for mp_buytime");
        plugin_registercmd("admin_c4timer","admin_c4timer",ACCESS_SERSET,"admin_c4timer <#> - setting for mp_c4timer");
        plugin_registercmd("admin_chattime","admin_chattime",ACCESS_SERSET,"admin_chattime <#> - setting for mp_chattime");
        plugin_registercmd("admin_fadetoblack","admin_fadetoblack",ACCESS_SERSET,"admin_fadetoblack <1 or 0> - mp_fadetoblack on or off.");
        plugin_registercmd("admin_forcechasecam","admin_forcechasecam",ACCESS_SERSET,"admin_forcechasecam <#> - setting for mp_forcechasecam");
        plugin_registercmd("admin_flashlight","admin_flashlight",ACCESS_SERSET,"admin_flashlight <1 or 0> - mp_flashlight on or off");
        plugin_registercmd("admin_footsteps","admin_footsteps",ACCESS_SERSET,"admin_footsteps <1 or 0> - mp_footsteps on or off");
        plugin_registercmd("admin_freezetime","admin_freezetime",ACCESS_SERSET,"admin_freezetime <#> - setting for mp_freezetime");
        plugin_registercmd("admin_hpenalty","admin_hpenalty",ACCESS_SERSET,"admin_hpenalty <#> - setting for mp_hostagepenalty");
        plugin_registercmd("admin_limitteams","admin_limitteams",ACCESS_SERSET,"admin_limitteams <1 or 0> - mp_limitteams on or off");
        plugin_registercmd("admin_maxrounds","admin_maxrounds",ACCESS_SERSET,"admin_maxrounds <#> - setting for mp_maxrounds");
        plugin_registercmd("admin_playerid","admin_playerid",ACCESS_SERSET,"admin_playerid <#> - setting for mp_playerid");
        plugin_registercmd("admin_roundtime","admin_roundtime",ACCESS_SERSET,"admin_roundtime <#> - setting for mp_roundtime");
        plugin_registercmd("admin_tkpunish","admin_tkpunish",ACCESS_SERSET,"admin_tkpunish <1 or 0> - mp_tkpunish on or off");
        plugin_registercmd("admin_winlimit","admin_winlimit",ACCESS_SERSET,"admin_winlimit <#> - setting for mp_winlimit");
        plugin_registercmd("admin_announcer","admin_announcer",ACCESS_SERSET,"admin_announcer <0/1/2/> - admin announcing off/on/on with sound");
        plugin_registercmd("say", "HandleSay", ACCESS_ALL);
        plugin_registerhelp("say", ACCESS_ALL, "say admin: Announces the Admins");

        return PLUGIN_CONTINUE;
}


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 22.01.2004, 02:17 
Benutzeravatar

Registriert: 15.10.2003, 17:34
Beiträge: 137
Wohnort: Nähe Karlsruhe
bei mir kommt nur
Code:
plugin_stetze.sma(503) Warning [217]: loose indentation
plugin_stetze.sma(517) Warning [217]: loose indentation
plugin_stetze.sma(555) Warning [217]: loose indentation
plugin_stetze.sma(558) Warning [217]: loose indentation
plugin_stetze.sma(567) Warning [217]: loose indentation
plugin_stetze.sma(569) Warning [217]: loose indentation
plugin_stetze.sma(573) Warning [217]: loose indentation


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 22.01.2004, 02:29 
Benutzeravatar

Registriert: 15.10.2003, 17:34
Beiträge: 137
Wohnort: Nähe Karlsruhe
Zitat:
bei mir kommt nur
Code:
plugin_stetze.sma(503) Warning [217]: loose indentation
plugin_stetze.sma(517) Warning [217]: loose indentation
plugin_stetze.sma(555) Warning [217]: loose indentation
plugin_stetze.sma(558) Warning [217]: loose indentation
plugin_stetze.sma(567) Warning [217]: loose indentation
plugin_stetze.sma(569) Warning [217]: loose indentation
plugin_stetze.sma(573) Warning [217]: loose indentation
und bei der vertigen sma kommt ein error.

sorry aber so ist es .
Dark kannst du sie mir als sma geben weisnet aber vieleicht geht da beim kopieren was falsch.


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 22.01.2004, 20:07 
Benutzeravatar

Registriert: 31.05.2003, 09:16
Beiträge: 790
bitte...


Dateianhänge:
plugin_stetze.zip [3.97 KiB]
280-mal heruntergeladen
Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 23.01.2004, 09:20 
Benutzeravatar

Registriert: 15.10.2003, 17:34
Beiträge: 137
Wohnort: Nähe Karlsruhe
sorry aber du bist zu spät ich hab aus der fertigen sma das error raus bekommen.
aber danke


Nach oben
   
 Betreff des Beitrags:
BeitragVerfasst: 15.02.2004, 16:52 
Benutzeravatar

Registriert: 31.05.2003, 09:16
Beiträge: 790
@ stetze, wo sollte der link denn hingehen...?


Nach oben
   
Beiträge der letzten Zeit anzeigen:  Sortiere nach  
Ein neues Thema erstellen  Auf das Thema antworten  [ 10 Beiträge ] 


Du darfst keine neuen Themen in diesem Forum erstellen.
Du darfst keine Antworten zu Themen in diesem Forum erstellen.
Du darfst deine Beiträge in diesem Forum nicht ändern.
Du darfst deine Beiträge in diesem Forum nicht löschen.
Du darfst keine Dateianhänge in diesem Forum erstellen.

Suche nach:
Powered by phpBB® Forum Software © phpBB Limited
Deutsche Übersetzung durch phpBB.de
Original Design von "[ Half-Life Admin Mod © Alfred Reynolds 2000-2003 ] - [ site design by Jägermeister ]"