Help with this commands!
#1

Код:
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;
}
No bans, and no kicks...
And in the Console and logs show this:



Thanks, sorry for my bad english
Reply


Messages In This Thread
[Solved] Help with this commands! - by FullCircle - 19.06.2014, 23:08
Re: Help with this commands! - by Scrillex - 20.06.2014, 00:25
Respuesta: Re: Help with this commands! - by FullCircle - 20.06.2014, 00:40
Respuesta: Help with this commands! - by FullCircle - 20.06.2014, 18:48

Forum Jump:


Users browsing this thread: 1 Guest(s)