Hallo Community ,
ich wollte nun ein T-ban System einfügen und bekomme diese Fails.
Es sind zwar nur Warnings, aber es funkt leider nix .
Zeilen
dcmd_tban(playerid,params[])
{
new pID,pIdName[MAX_PLAYER_NAME],pName[MAX_PLAYER_NAME],banTime,reason[64],string[128];
if(SpielerInfo[playerid][Adminlevel] <= 1) { return 1; }
if(sscanf(params,"uds",pID,banTime,reason)) { return SendClientMessage(playerid,COLOR_GRAD1,"Benutzung: /tban [Spieler / ID] [Zeit in Minuten] [Grund]."); }
if(!IsPlayerConnected(pID)) { return SendClientMessage(playerid,COLOR_GRAD1,"Falsche ID!"); }
if(banTime < 15) { return SendClientMessage(playerid,COLOR_GRAD1,"Minimale Zeit: 15 Minuten"); }
GetPlayerName(pID,pIdName,sizeof(pIdName));
GetPlayerName(playerid,pName,sizeof(pName));
format(string,sizeof(string),"AdmCmd: %s wurde von %s für %d Minuten gebannt, Grund: %s.",pIdName,pName,banTime,reason);
SendClientMessageToAll(COLOR_LIGHTRED,string);
printf("AdmCmd(TIMEBAN): Admin: %s(%i) - Timebanned Player: %s(%i) - Timeban Reason: %s.",pName,playerid,pIdName,pID,reason);
pBanner[pID] = pName;
TBan(pID,banTime);
return 1;
}
dcmd_tunban(playerid,params[])
{
new pName[MAX_PLAYER_NAME],pIdName[MAX_PLAYER_NAME];
if(SpielerInfo[playerid][Adminlevel] <= 6) { return 1; }
if(sscanf(params,"s",pIdName)) { return SendClientMessage(playerid,COLOR_GRAD1,"Benutzung: /tunban [Voller Spielername]."); }
GetPlayerName(playerid,pName,sizeof(pName));
if(BanFileExist(pIdName))
{
TUnban(pIdName);
SendClientMessage(playerid, COLOR_GREEN, "Spieler entbannt!");
printf("AdmCmd(UNTIMEBAN): Admin: %s(%i) - untimebanned Player: %s.",pName,playerid,pIdName);
return 1;
} else { return SendClientMessage(playerid,COLOR_GRAD1,"Falscher Name! Gib den genauen Namen ein!"); }
}
Warnings
C:\Users\Domenik\Desktop\Life-like-Kingz[0.3d]\gamemodes\ScriptSaved.pwn(65915) : warning 203: symbol is never used: "dcmd_tban"
C:\Users\Domenik\Desktop\Life-like-Kingz[0.3d]\gamemodes\ScriptSaved.pwn(65915) : warning 203: symbol is never used: "dcmd_tunban"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Header size: 14604 bytes
Code size: 2717536 bytes
Data size: 26910704 bytes
Stack/heap size: 32768 bytes; estimated max. usage: unknown, due to recursion
Total requirements:29675612 bytes
4 Warnings.