[Ayuda]Con algo...
#10

Aaa.., xD
Quote:

dcmd_warn(playerid,params[])
{
if(PlayerInfo[playerid][Level] >= 2)
{
new tmp[256], tmp2[256], Index;
tmp = strtok(params,Index), tmp2 = strtok(params,Index);
if(!strlen(tmp) || !strlen(tmp2)) return SendClientMessage(playerid, red, "Escribe: /warn [playerid] [Razon]");
new warned = strval(tmp), str[128];
if(PlayerInfo[warned][Level] == ServerInfo[MaxAdminLevel] && PlayerInfo[playerid][Level] != ServerInfo[MaxAdminLevel]) return SendClientMessage(playerid,red,"ERROR: You cannot use this command on this admin");
if(IsPlayerConnected(warned) && warned != INVALID_PLAYER_ID)
{
if(warned != playerid)
{
CMDMessageToAdmins(playerid,"WARN");
PlayerInfo[warned][Warnings]++;
if( PlayerInfo[warned][Warnings] == MAX_WARNINGS)
{
format(str, sizeof (str), "*** %s (id:%d) fue expulsado por sobrepasar los 3 warnings. (Warning: %d/%d)***", pName(warned), playerid, params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);
SendClientMessageToAll(grey, str);
SaveToFile("KickLog",str); Kick(warned);
return PlayerInfo[warned][Warnings] = 0;
}
else
{
format(str, sizeof (str), "*** %s (id:%d) fue advertido por un admin. (Razon: %s) (Warning: %d/%d)***", pName(warned), warned, params[1+strlen(tmp)], PlayerInfo[warned][Warnings], MAX_WARNINGS);
return SendClientMessageToAll(yellow, str);
}
}
else return SendClientMessage(playerid, red, "No puedes darte una warn a vos mismo!");

}
else return SendClientMessage(playerid, red, "Jugador no conectado!");
}
else return SendClientMessage(playerid,red,"No estas autorizado para usar este comando!");
}

strval(tmp) es la ID, pues igual con el kick/ban/etc
Reply


Messages In This Thread
[Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:26
Respuesta: [Ayuda]Con algo... - by Cesar_Biker - 09.08.2010, 19:30
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:36
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:42
Re: [Ayuda]Con algo... - by MedinaRockz - 09.08.2010, 19:42
Respuesta: [Ayuda]Con algo... - by Adoniiz - 09.08.2010, 19:42
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 19:46
Respuesta: [Ayuda]Con algo... - by Adoniiz - 09.08.2010, 19:47
Re: [Ayuda]Con algo... - by TiNcH010 - 09.08.2010, 20:07
Respuesta: [Ayuda]Con algo... - by Cesar_Biker - 09.08.2010, 20:07

Forum Jump:


Users browsing this thread: 2 Guest(s)