[Ajuda] ajuda
#1

Bom jб criei os sistema de ban talz stock e tudo mas porйm falta criar o comando /ban e / desban alguйm pode me ajudar.
pawn Код:
#define LOCALBANNICK "/Nicks banidos/%s.cfg"
#define LOCALBANIP   "/IPs banidos/%s.cfg"

new DSName[MAX_PLAYER_NAME];
new Don[150];
stock BanId(playerid,motivo[])
{
    GetPlayerName(playerid,DSName,sizeof(DSName));
    format(Don,sizeof(Don),"-Aviso- O jogador %s foi banido [Motivo: %s]",DSName, motivo);
    SendClientMessageToAll(-1,Don);
    Kick(playerid);
}
stock BanNick(playerid,motivo[])
{
    GetPlayerName(playerid,DSName,sizeof(DSName));
    format(Don,sizeof(Don),LOCALBANNICK,DSName);
    DOF2_CreateFile(Don);
    DOF2_SetInt(Don, "Motivo", motivo);
    format(Don,sizeof(Don),"-Aviso- O jogador %s foi banido [Motivo: %s]",DSName, motivo);
    SendClientMessageToAll(-1,Don);
    Kick(playerid);
}
stock BanIP(playerid,motivo[])
{
    GetPlayerIp(playerid,IP,sizeof(IP));
    format(Don,sizeof(Don),LOCALBANIP,IP);
    DOF2_CreateFile(Don);
    DOF2_SetInt(Don, "Motivo", motivo);
    format(Don,sizeof(Don),"-Aviso- O IP %i foi banido [Motivo: %s]",IP, motivo);
    SendClientMessageToAll(-1,Don);
    Kick(playerid);
}
stock BanNickOff(Nick,motivo[])
{
    format(Don,sizeof(Don),LOCALBANNICK,Nick);
    DOF2_CreateFile(Don);
    DOF2_SetInt(Don, "Motivo", motivo);
    format(Don,sizeof(Don),"-Aviso- O Nick %s foi banido-off [Motivo: %s]",Nick, motivo);
    SendClientMessageToAll(-1,Don);
    Kick(playerid);
}
stock BanIPOFF(IP,motivo[])
{
    format(Don,sizeof(Don),LOCALBANIP,IP);
    DOF2_CreateFile(Don);
    DOF2_SetInt(Don, "Motivo", motivo);
    format(Don,sizeof(Don),"-Aviso- O IP %i foi banido-off [Motivo: %s]",IP, motivo);
    SendClientMessageToAll(-1,Don);
}
stock UnBanNick(Nome)
{
    format(Don,sizeof(Don),LOCALBANNICK,Nome);
    if(!DOF2_FileExists(Don))return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");
    DOF2_RemoveFile(Don);
    format(Don,sizeof(Don),"-Aviso- O nick %s acaba de ser desbanido.",Nome);
    SendClientMessageToAll(-1,Don);
}
stock UnBanIP(IP)
{
    format(Don,sizeof(Don),LOCALBANIP,IP);
    if(!DOF2_FileExists(Don))return SendClientMessage(playerid, -1,"[ERRO] Conta nao banida.");
    DOF2_RemoveFile(Don);
    format(Don,sizeof(Don),"-Aviso- O ip %i acaba de ser desbanido.",IP);
    SendClientMessageToAll(-1,Don);
}
stock CheckBan(playerid)
{
    new Don2[150];
    GetPlayerIp(playerid,IP,sizeof(IP));
    format(Don,sizeof(Don),LOCALBANIP,IP);
    if(!DOF2_FileExists(Don))
    {
        SendClientMessage(playerid,-1,"-Aviso- Voce esta banido");
        Kick(playerid);
    }
    GetPlayerName(playerid,DSName,sizeof(DSName));
    format(Don2,sizeof(Don2),LOCALBANNICK,DSName);
    if(!DOF2_FileExists(Don2))
    {
        SendClientMessage(playerid,-1,"-Aviso- Voce esta banido");
        Kick(playerid);
    }
}
OBS: Reputaзгo para quem me ajuda e tem que ser zcmd.
Reply


Messages In This Thread
ajuda - by lucaskill66 - 09.10.2012, 23:40
Re: ajuda - by ViniBorn - 09.10.2012, 23:53
Re: ajuda - by arakuta - 10.10.2012, 00:05
Re: ajuda - by Metropole RP - 10.10.2012, 00:40
Re: ajuda - by lucaskill66 - 10.10.2012, 01:12
Re: ajuda - by Metropole RP - 10.10.2012, 01:41
Re: ajuda - by zSuYaNw - 10.10.2012, 01:56
Re: ajuda - by Jason` - 10.10.2012, 02:02
Re: ajuda - by lucaskill66 - 10.10.2012, 02:50
Re: ajuda - by Metropole RP - 10.10.2012, 19:17

Forum Jump:


Users browsing this thread: 1 Guest(s)