Servus!
Hat vielleicht jemand eine Ahnung warum dieses LogD-Plugin auf 1.6 nicht mehr läuft?
Code:
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_CONSOLE 131072
#define ACCESS_AUTOTEAM 4096
new STRING_VERSION[MAX_DATA_LENGTH] = "1.1";
new User[MAX_NAME_LENGTH];
new Request = 1;
public logd_teamselect(HLCommand,HLData,HLUserName) {
new sID[MAX_DATA_LENGTH];
new Data[MAX_DATA_LENGTH];
convert_string(HLData, Data, MAX_DATA_LENGTH);
strbreak(Data, sID, Data, MAX_DATA_LENGTH);
new iID = strtonum( sID );
if( !playerinfo(iID,User,MAX_NAME_LENGTH) ) {
return PLUGIN_FAILURE;
}
if(Request == 1) {
execclient(User,"+attack");
execclient(User,"menuselect 5");
execclient(User,"menuselect 5");
execclient(User,"-attack");
}
return PLUGIN_HANDLED;
}
public admin_autoteams(HLCommand,HLData,HLUserName,UserIndex) {
new Data[MAX_DATA_LENGTH];
new Toggle;
convert_string(HLData, Data, MAX_DATA_LENGTH);
if (strlen(Data) > 0) {
Toggle = strtonum(Data);
if (Toggle == 1) {
Request = 1;
selfmessage("[ Auto Team Selection has been activated. ]");
centersay("Auto Team Selection has been enabled on the server",5,0,255,0);
}else if (Toggle == 0) {
Request = 0;
selfmessage("[ Auto Team Selection has been deactivated. ]");
centersay("Auto Team Selection has been disabled on the server",5,0,255,0);
}else {
Toggle = -1;
selfmessage("[ Command not issued correctly, 1=on, 0=off ]");
}
}else {
selfmessage("[ Command not issued correctly, 1=on, 0=off ]");
}
return PLUGIN_HANDLED;
}
public plugin_init() {
plugin_registerinfo("Plugin_LogD_Autoteamselect","Auto player team selection for incoming players to server.",STRING_VERSION);
plugin_registercmd("logd_teamselect", "logd_teamselect", ACCESS_CONSOLE, "");
plugin_registercmd("admin_autoteams", "admin_autoteams", ACCESS_AUTOTEAM, "admin_autoteams <#>: Toggles auto player team selection(1=on/0=off)");
exec( "logd_reg 51 admin_command logd_teamselect" );
return PLUGIN_CONTINUE;
}
*Edit by Sir Drink a lot (20:04 Uhr): Habe aus den quote Tags code Tags gemacht...und siehe da, ein TAB anstatt ein Leerzeichen
*