Ja ich hab mir mal die neue am Version gezogen und alle meine Plugins neu compiliert, jez hab ic haber bei 2 Fehler bekommen...
Und wollte daher mal fragen ob mir dabei wör helfen könnte...
Plugin 1 :
Code:
// -Plugin_sank_shutdown. Stolen, coerced, silver-tongue-outta'd by Kleen13. //
// Thanks to Sank for wisdom, Shady Milkman for insight, and Halogen for //
// posting absolute rubbish at regular intervals.... //
// -This updated version also includes shutdown audio 6 seconds from server //
// termination. Thanks to Kndroc for the Playsound function //
// //
// -This script provides a "nice" server shutdown message (30 secs) before //
// exiting HLDS. By default, the only people authorized to use this script //
// are "rcon access" admins. //
// //
// //
/////////////////////////////////////////////////////////////////////////////////////
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_SHUTDOWN 65535
new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.e";
public plugin_init()
{
plugin_registerinfo("Sank Shutdown Plugin", "Enables soft remote shutting down of a server", STRING_VERSION);
plugin_registercmd("admin_shutdown", "admin_shutdown", ACCESS_SHUTDOWN, "admin_shutdown: Starts the shutdown timer.");
return PLUGIN_CONTINUE;
}
playShutdownSound() {
new i;
new iMaxPlayers = maxplayercount();
new Name[MAX_NAME_LENGTH];
new UserID;
new WONID;
if (getvar("admin_fx") != 0) {
for (i = 1; i <= iMaxPlayers; i++) {
if (playerinfo(i,Name,MAX_NAME_LENGTH,UserID,WONID) != 0) {
playsound(Name, "scientist/c1a0_sci_dis15a.wav");
}
}
}
}
public admin_shutdown(HLData, HLCommand, HLUser, UserIndex)
{
set_timer("kleen_shutdown", 1, 31);
plugin_exec("admin_say", "Sorry Server wird restartet, plz come back");
return PLUGIN_HANDLED;
}
public kleen_shutdown(Timer, Repeat, HLUser, HLParam)
{
new Text[MAX_TEXT_LENGTH];
snprintf(Text, MAX_TEXT_LENGTH, "Server wird neugestartet in^n %d", Repeat-1);
plugin_exec("admin_csay", Text);
//6 seconds left to give time for the sound to be played completely
//change 4 to a different number of seconds if desired becuse of a longer/shorter sound
if( Repeat-1 == 6 )
{
//play the shutting down sound
playShutdownSound()
//for now log a message that its happening for debugging purposes
log( "Clients Told to Play Shutdown Sound" );
}
if (Repeat-1 == 0)
{
kill_timer(Timer);
plugin_exec("admin_say", "Have a Nice Day!");
exec("exit");
}
return PLUGIN_HANDLED;
}
Fehler dazu :
Code:
plugin_sank_shutdown2.sma(72) Error [1]: expected token: ";", but found "-identifier-"
Plugin 2 :
Code:
// Connect, disconnect, respawn detection. To use with StatsMe MetaMod plugin.
// http://www.olo.counter-strike.pl
// http://forums.unitedadmins.com/forumdisplay.php?s=&forumid=36
#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
#define ACCESS_CONSOLE 131072
new STRING_VERSION[MAX_DATA_LENGTH] = "2.1.9";
new SoundConnect[MAX_TEXT_LENGTH]="sound/misc/gong.wav"
new SoundDisconnect[MAX_TEXT_LENGTH]="sound/misc/comeagain.wav"
// connected and disconnected
public sm_cdr_evn(HLCommand,HLData) {
new mymsg[MAX_DATA_LENGTH];
convert_string(HLData,mymsg,MAX_DATA_LENGTH);
new src[4], Type[4], Msg[MAX_DATA_LENGTH], Name[MAX_DATA_LENGTH];
strgsplit(mymsg, " ","^"", src, 4, Type, 4, Msg, MAX_DATA_LENGTH,Name, MAX_DATA_LENGTH);
if (Msg[6]=='c'){
snprintf(mymsg,200,"%s hat den Server betreten.^nSelam Aleikum in der Doenerbude!",Name); soundall(SoundConnect); // - * Player_name connected
}
else {
snprintf(mymsg,200,"%s hat den Server verlassen.^nUnd fuer die andern gehts jetzt weiter!",Name); soundall(SoundDisconnect); // - * Player_name disconnected
}
typesay(mymsg, 6, 0, 100, 200);
return PLUGIN_CONTINUE;
}
public plugin_init() {
plugin_registerinfo("Connect, Disconnect, Respawn","Detects some events.",STRING_VERSION);
plugin_registercmd("sm_cdr_evn","sm_cdr_evn",ACCESS_CONSOLE,"");
plugin_registercmd("sm_cdrstr_evn","sm_cdrstr_evn",ACCESS_CONSOLE,"");
exec("sm_register TextMsg ^"admin_command sm_cdr_evn^" ac ^"2=#Game_c^" ^"2=#Game_d^"");
exec("sm_register ResetHUD ^"admin_command sm_cdrstr_evn^" bd");
return PLUGIN_CONTINUE;
}
soundall(Sound[]){
new Name[MAX_NAME_LENGTH];
new maxplayers = maxplayercount();
new iWONID;
new i;
new dummy1;
for(i = 1; i <= maxplayers; i++ )
{
if( playerinfo(i, Name, MAX_NAME_LENGTH,dummy1,iWONID,dummy1,dummy1) ){
playsound(Name,Sound);
}
}
return PLUGIN_HANDLED;
}
Fehler dazu :
Code:
plugin_sm_cdr.sma(14) Error [1]: expected token: ";", but found "new"
plugin_sm_cdr.sma(17) Error [1]: expected token: ";", but found "public"
Würde mich freuen wenn mir da wer weiterhelfen könnte...
Thx im voraus...
_________________
<werbung>
www.teamarab.de
62.4.81.251:27085 #teamarab.de | Doenerbude
62.4.74.200:27020 #teamarab.de | Muckibude
80.239.224.29:27700 - #teamarab.de ][ Muckibude | bY quado.net -
#teamarab.de @ Q - Net
</werbung>