Hallo mein Server Crasht bei /tban :
if ( !strcmp(cmd, "/tban", true)) { tmp = strtok(cmdtext,idx); new player = strval( tmp );
tmp = strtok(cmdtext,idx); new pbtime = strval( tmp );
if (IsPlayerConnected(player)) { GetPlayerName(player, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername));
if ( PlayerInfo[playerid][pAdmin] >= 4) { if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GREY, "Verwendung: /tban [playerid/Name] [Zeit]"); return 1; } if(PlayerInfo[giveplayerid][pAdmin] >= 1340) { SendClientMessage(playerid, COLOR_GREY, "Du kannst den ServerOwner nicht bannen!!"); return 1; } if ( pbtime > 0 ) {
format( string, sizeof(string), "%s hat dich für %d Minuten gebannt!",sendername,pbtime); SendClientMessage(player, COLOR_LIGHTRED, string); format( string, sizeof(string), "Du hast %s für %d Minuten vom Server gebannt!",giveplayer,pbtime); SendClientMessage(playerid, COLOR_WHITE, string); format( string, sizeof(string), "AdmCmd: %s wurde für %d Minuten von %s gebannt!",giveplayer,pbtime,sendername); SendClientMessageToAll(COLOR_RED, string); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); SendClientMessage(player,COLOR_WHITE, ""); format(string, sizeof(string), "Du wurdest vom Moderator %s für %d Min. vom Server gebannt.", sendername, pbtime); SendClientMessage(player,COLOR_LIGHTRED, string); SetPlayerPos(player,264.6288,77.5742,1001.0391); SetPlayerInterior(player, 6); PlayerInfo[player][pInt] = 6; format(string, sizeof(string), "~r~~h~Zeit Ban: ~n~~r~%d Min.",pbtime); GameTextForPlayer(player, string, 6000, 3); TBan(player,pbtime); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); //format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] Adminstrator: %s bannt %s fuer %d Minuten.",d,m,y,h,mi,s,sendername,giveplayer, pbtime); //BanLog(string); } else {
format( string, sizeof(string), "Du musst mind. eine Zeit von 1 Minute eingeben!"); SendClientMessage(playerid, COLOR_GREY, string); }
} else { format( string, sizeof(string), "Du kannst diesen Befehl nicht nutzen!"); SendClientMessage(playerid, COLOR_GREY, string); }
} else { format( string, sizeof(string), "Der Spieler %s ist nicht Online!",player); SendClientMessage(playerid, COLOR_GREY, string); }
return 1;
}