[AJUDA] /ban ban o play. dps que relogo ban o admin tbm.
#1

instalei o sistema de admin da SB
e quando da /ban . ele ban o play normal
dai o admin reloga e ele ban o admin logo quando entra
pelo mesmo admin
e com o nick do admin oO

cmd :

Код:
if(strcmp(cmd, "/banir", true) == 0) {
        if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"[SB]Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
        new Hours,Minutes,Seconds,Days,Months,Years;
        gettime(Hours, Minutes, Seconds);getdate(Years, Months, Days);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, 0x007FFFAA, "USE: /banir [playerid] [motivo]");
            return 1;
        }
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
        }
        new offset = idx;
        new reason[64];
        while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) {
            reason[idx - offset] = cmdtext[idx];
            idx++;
        }
        reason[idx - offset] = EOS;
        new playa = strval(tmp);
        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, NomePlayer, sizeof(NomePlayer));
        format(string, sizeof(string), "*[SB]Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayer, reason);
        SendClientMessageToAll(0x007FFFAA, string);
        SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        format(string, sizeof(string), "Vocк foi pego. O admin baniu vocк: %s", NomePlayer);
        SendClientMessage(playa,0x007FFFAA, string);
        format(string, sizeof(string),"Motivo: %s ", reason);
        SendClientMessage(playa,0x007FFFAA, string);
        format(string, sizeof(string), "Data: %d/%d/%d", Days,Months,Years);
        SendClientMessage(playa,0x007FFFAA,string);
        format(string, sizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
        SendClientMessage(playa,0x007FFFAA,string);
        SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        Banido[playerid] = giveplayer;
        Banidor[playerid] = NomePlayer;
        Motivo[playerid] = reason;
        Dia[playerid] = Days;
        Mes[playerid] = Months;
        Ano[playerid] = Years;
        new file[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/sbadmin/Ban/%s.ini",name);
        if(!fexist(file)) {
            dini_Create(file);
            dini_Set(file,"Banido", giveplayer);
            dini_Set(file,"Banidor", NomePlayer);
            dini_Set(file, "Motivo", reason);
            dini_IntSet(file, "Dia", Days);
            dini_IntSet(file, "Mкs", Months);
            dini_IntSet(file, "Ano", Years);
            GetPlayerName(playerid, name, sizeof(name));
            printf("%s Foi Banido!", name);
        }
        Kick(playa);
        return 1;
    }
Reply
#2

pawn Код:
if(strcmp(cmd, "/banir", true) == 0) {
        if(GetPlayerLevel(playerid) < 4) return SendClientMessage(playerid,0xDEEE20FF,"[SB]Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
        new Hours,Minutes,Seconds,Days,Months,Years;
        gettime(Hours, Minutes, Seconds);getdate(Years, Months, Days);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, 0x007FFFAA, "USE: /banir [playerid] [motivo]");
            return 1;
        }
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
        }
        new offset = idx;
        new reason[64];
        while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) {
            reason[idx - offset] = cmdtext[idx];
            idx++;
        }
        reason[idx - offset] = EOS;
        new playa = strval(tmp);
        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, NomePlayer, sizeof(NomePlayer));
        format(string, sizeof(string), "*[SB]Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayer, reason);
        SendClientMessageToAll(0x007FFFAA, string);
        SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        format(string, sizeof(string), "Vocк foi pego. O admin baniu vocк: %s", NomePlayer);
        SendClientMessage(playa,0x007FFFAA, string);
        format(string, sizeof(string),"Motivo: %s ", reason);
        SendClientMessage(playa,0x007FFFAA, string);
        format(string, sizeof(string), "Data: %d/%d/%d", Days,Months,Years);
        SendClientMessage(playa,0x007FFFAA,string);
        format(string, sizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
        SendClientMessage(playa,0x007FFFAA,string);
        SendClientMessage(playa,COLOR_GREEN,"____________________________________________________");
        Banido[playerid] = giveplayer;
        Banidor[playerid] = NomePlayer;
        Motivo[playerid] = reason;
        Dia[playerid] = Days;
        Mes[playerid] = Months;
        Ano[playerid] = Years;
        new file[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/sbadmin/Ban/%s.ini",name);
        if(!fexist(file)) {
            dini_Create(file);
            dini_Set(file,"Banido", giveplayer);
            dini_Set(file,"Banidor", NomePlayer);
            dini_Set(file, "Motivo", reason);
            dini_IntSet(file, "Dia", Days);
            dini_IntSet(file, "Mкs", Months);
            dini_IntSet(file, "Ano", Years);
            GetPlayerName(playerid, name, sizeof(name));
            printf("%s Foi Banido!", name);
        }
        Kick(giveplayer);
        return 1;
    }
Reply
#3

error 035: argument type mismatch (argument 1)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.



-VSEMEAJUDANDODNV *-* '
Reply
#4

Manda a linha -.-
Reply
#5

(612)
skeci mals
Reply
#6

O que tem nela? o.O
Reply
#7

Kick(giveplayer);

lol
Reply
#8

pawn Код:
if(strcmp(cmd, "/banir", true) == 0) {
        if(GetPlayerLevel(playerid) < 4) return EnviarMSG(playerid,0xDEEE20FF,"[SB]Admin: Vocк nгo tem Nivel Necessбrio para usar este comando");
        new Hours,Minutes,Seconds,Days,Months,Years;
        gettime(Hours, Minutes, Seconds);getdate(Years, Months, Days);
        if(!strlen(tmp)) {
            EnviarMSG(playerid, 0x007FFFAA, "USE: /banir [playerid] [motivo]");
            return 1;
        }
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
        }
        new offset = idx;
        new reason[64];
        while ((idx < length) && ((idx - offset) < (sizeof(reason) - 1))) {
            reason[idx - offset] = cmdtext[idx];
            idx++;
        }
        reason[idx - offset] = EOS;
        new playa = strval(tmp);
        GetPlayerName(playa, giveplayer, sizeof(giveplayer));
        GetPlayerName(playerid, NomePlayer, sizeof(NomePlayer));
        format(string, sizeof(string), "*[SB]Admin: %s foi Banido pelo %s. Motivo: %s",giveplayer ,NomePlayer, reason);
        EnviarMSGAll(0x007FFFAA, string);
        EnviarMSG(playerid,0x33AA33AA,"==============================================================");
        format(string, sizeof(string), "Vocк foi pego.O admin baniu vocк: %s", NomePlayer);
        EnviarMSG(playa,0x007FFFAA, string);
        format(string, sizeof(string),"Motivo: %s ", reason);
        EnviarMSG(playa,0x007FFFAA, string);
        format(string, sizeof(string), "Data: %d/%d/%d", Days,Months,Years);
        EnviarMSG(playa,0x007FFFAA,string);
        format(string, sizeof(string), "Hora %d:%d:%d",Hours,Minutes,Seconds);
        EnviarMSG(playa,0x007FFFAA,string);
        EnviarMSG(playerid,0x33AA33AA,"==============================================================");
        Banido[playerid] = giveplayer;
        Banidor[playerid] = NomePlayer;
        Motivo[playerid] = reason;
        Dia[playerid] = Days;
        Mes[playerid] = Months;
        Ano[playerid] = Years;
        new file[128],name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(file,sizeof(file),"/sbadmin/Ban/%s.ini",name);
        if(!fexist(file)) {
            dini_Create(file);
            dini_Set(file,"Banido", giveplayer);
            dini_Set(file,"Banidor", NomePlayer);
            dini_Set(file, "Motivo", reason);
            dini_IntSet(file, "Dia", Days);
            dini_IntSet(file, "Mкs", Months);
            dini_IntSet(file, "Ano", Years);
            GetPlayerName(playerid, name, sizeof(name));
            printf("%s Foi Banido!", name);
        }
        Kick(playa);
        return 1;
    }
Reply
#9

consegui !
vlw manin dnv *-*
Reply
#10

^^
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)