Cara, passe os erros que aconetece no seu sistema de admin. Quem sabe posso te ajudar.
Sistema kick:
Код:
if(strcmp(cmd, "/kick", true) == 0) {
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /kick [playerid/Parte-do-Nick] [reason]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /kick [playerid/Parte-do-Nick] [reason]");
return 1;
}
if(strcmp(result,"1", true) == 0) { result = "Nick imprуprio"; }
format(string, sizeof(string), "|CMD ADMIN|: %s foi kickado por %s, Motivo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_NEWS, string);
new year, month,day;
getdate(year, month, day);
format(string, sizeof(string), "|CMD ADMIN|: %s foi kickado por %s, Motivo: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
KickLog(string);
Kick(giveplayerid);
return 1;
}
}
}
else
{
format(string, sizeof(string), " %d nгo й um jogador ativo.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Sistema Ban:
Код:
if(strcmp(cmd, "/ban", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /ban [playerid/Parte-do-Nick] [razгo]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(giveplayerid) && PlayerInfo[giveplayerid][pAdmin] == 0)
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USO: /ban [playerid/Parte-do-Nick] [reason]");
return 1;
}
new year, month,day;
getdate(year, month, day);
if(strcmp(result,"1",true) == 0) { result = "Uso de cheat"; }
format(string, sizeof(string), "|ADMIN|: %s foi banido por %s, razгo: %s (%d-%d-%d)", giveplayer, sendername, (result),month,day,year);
BanLog(string);
format(string, sizeof(string), "|ADMIN|: %s foi banido por %s, razгo: %s", giveplayer, sendername, (result));
SendClientMessageToAll(COLOR_NEWS, string);
PlayerInfo[giveplayerid][pLevel] = 999;
Ban(giveplayerid);
return 1;
}
}//not connected
}
else
{
format(string, sizeof(string), " %d is not an active player.", giveplayerid);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
Sistemas retirado de outro GM. (Edite esses comandos.)