19.06.2014, 23:08
(
Последний раз редактировалось FullCircle; 20.06.2014 в 18:49.
Причина: Edit the title
)
Код:
CMD:kick(playerid, params[])
{
new string[128], ID, razon;
if(IsPlayerConnected(playerid))
{
if(Informacion[playerid][Admin] < 2) return SendClientMessage(playerid,COLOR_GRIS,"No Autorizado.");
{
if(!sscanf(params, "ds", ID, razon))
{
format(string,sizeof(string),"El usuario %s fue expulsado por el administrador %s. Razуn: %s", NombreJ(ID), NombreJ(playerid), razon);
BroadCast(COLOR_AMARILLOADMIN, string);
Kick(ID);
printf("[ADMIN] %s kickeу a %s. Razуn: %s.", NombreJ(playerid), NombreJ(ID), razon);
Logs("Seguridad", string);
}
else return SendClientMessage(playerid, COLOR_GRIS, "/kick <id> <Razуn>");
}
}
return 1;
}
Код:
CMD:ban(playerid, params[])
{
new string[128], ID, razon, PlayerIP[15];
if(IsPlayerConnected(playerid))
{
if(Informacion[playerid][Admin] < 3) return SendClientMessage(playerid,COLOR_GRIS,"No Autorizado.");
{
if(!sscanf(params, "ds", ID, razon))
{
Informacion[playerid][ban] = 1;
format(string,sizeof(string),"El usuario %s fue baneado por el administrador %s. Razуn: %s", NombreJ(ID), NombreJ(playerid), razon);
BroadCast(COLOR_AMARILLOADMIN, string);
Kick(ID);
printf("[ADMIN] %s baneу a %s. Razуn: %s.", NombreJ(playerid), NombreJ(ID), razon);
Logs("Seguridad", string);
new File:BanIp = fopen("BanIp.txt", io_read);
if(BanIp)
{
GetPlayerIp(ID, PlayerIP, sizeof(PlayerIP));
fwrite(BanIp, PlayerIP);
fclose(BanIp);
}
}
else return SendClientMessage(playerid, COLOR_GRIS, "/ban <id> <Razуn>");
}
}
return 1;
}
And in the Console and logs show this:

Thanks, sorry for my bad english

