[FilterScript] [FS] improved mabako's admin script *UPDATED*
#30

HI ! So, I have resolved my problem...Damned timer...i think

After long tests, i have found that is the command "ban" who is different of Mabako script, and it\'s this part which contain the bug, so i "just" replaced by your (hard lol), and now it work.

MABAKO VERSION:

pawn Code:
else if (strcmp(command, "ban", true) == 0 && CL_ban != -1 && Level[playerid] >= CL_ban)
    {
 new banid[256];
 banid = admin_strtok(cmdtext, index);


        if(!strlen(banid)) { GetHelp(playerid,"ban-help")return 1; }

        new lookupid;
        if(NameLookup(playerid,banid,lookupid,1) != 1) return 1;
        if(LevelWarning(playerid,lookupid,command,1) == 1) return 1;


 new File:fhandle;
        fhandle = fopen("userban.txt",io_append);
        format(temp,sizeof(temp),"%s
"
,Name[lookupid]);
        fwrite(fhandle,temp);
        fclose(fhandle);

        SuccessMessage(playerid,lookupid,command,"banned","",1);

     SetBan(lookupid,admin_strrest(cmdtext,index+1));

     return 1;
    }

YOUR VERSION:

pawn Code:
else if ((strcmp(command, "b", true) == 0 || strcmp(command, "ban", true) == 0) && CL_ban != -1 && Level[playerid] >= CL_ban)
    {
        new banid[256];
        banid = admin_strtok(cmdtext, index);

        if(!strlen(banid)) { GetHelp(playerid,"ban-help")return 1; }

        new lookupid;

        if(NameLookup(playerid,banid,lookupid,1) != 1) return 1;
        if(LevelWarning(playerid,lookupid,command,1) == 1) return 1;
        /*
        new jreason[256];
        new dindex = index+1;
        jreason = admin_strrest(cmdtext, dindex);
      new jtext[256];
        if(strlen(jreason) > 0)
        {
            printf(" ----ban jreason: %s",jreason);
          new i = strval(jreason);
            switch(i)
            {
                case 1:format(jtext, sizeof(jtext), "god mode");
                case 2:format(jtext, sizeof(jtext), "money cheater");
                case 3:format(jtext, sizeof(jtext), "flying vehicle");
                case 4:format(jtext, sizeof(jtext), "flying character");
                case 5:format(jtext, sizeof(jtext), "known cheater");
                default:format(jtext, sizeof(jtext), "%s",jreason);
            }
        }
        else
        {
          jtext = "";
        }

        printf(" ----ban jtext: %s",jtext);*/


        SuccessMessage(playerid,lookupid,command,"banned","",1);

//      printf(" ----ban message done");

        SetBan(lookupid,admin_strrest(cmdtext, index+1),playerid);

//      printf(" ----ban SetBan done");

        return 1;
    }

AND MINE:

pawn Code:
//BAN (/ban)--------------------------------------------------------------------

    else if (strcmp(command, "ban", true) == 0 && CL_ban != -1) {
    if (Level[playerid] < CL_ban) {

            SendClientMessage(playerid,COLOR_RED,"This command is for admins only!");

            return 1;
        }

        new banid[256];
        banid = admin_strtok(cmdtext, index);
            if(!strlen(banid)) { GetHelp(playerid,"ban-help")return 1; }
            new lookupid;
            if(NameLookup(playerid,banid,lookupid,1) != 1) return 1;
            if(LevelWarning(playerid,lookupid,command,1) == 1) return 1;

        SuccessMessage(playerid,lookupid,command,"banned","",1);
        SetBan(lookupid,admin_strrest(cmdtext, index+1),playerid);
        return 1;
    }
(I can\'t understand /* */, is it useful?)

My version is coming soon i hope
Reply


Messages In This Thread
[FS] improved mabako's admin script *UPDATED* - by yellowblood - 24.07.2006, 09:10
Re: [FS] mabako's admin script - IMPROVED - by DJDD - 24.07.2006, 10:30
Re: [FS] mabako's admin script - IMPROVED - by yellowblood - 24.07.2006, 11:10
Re: [FS] mabako's admin script - IMPROVED - by mabako - 24.07.2006, 12:33
Re: [FS] mabako's admin script - IMPROVED - by DJDD - 24.07.2006, 13:04
Re: [FS] mabako's admin script - IMPROVED - by yellowblood - 24.07.2006, 13:15
Re: [FS] mabako's admin script - IMPROVED - by DJDD - 24.07.2006, 14:05
Re: [FS] mabako's admin script - IMPROVED - by yellowblood - 24.07.2006, 18:24
Re: [FS] mabako's admin script - IMPROVED - by 50p - 25.07.2006, 01:23
Re: [FS] mabako's admin script - IMPROVED - by yellowblood - 25.07.2006, 01:36
Re: [FS] mabako\'s admin script - IMPROVED - by 50p - 25.07.2006, 01:43
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 25.07.2006, 03:10
Re: [FS] mabako\'s admin script - IMPROVED - by 50p - 25.07.2006, 10:49
Re: [FS] mabako\'s admin script - IMPROVED - by mabako - 25.07.2006, 13:08
Re: [FS] mabako\'s admin script - IMPROVED - by 50p - 26.07.2006, 00:34
Re: [FS] mabako\'s admin script - IMPROVED - by Vidde - 26.07.2006, 01:48
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 26.07.2006, 04:49
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 26.07.2006, 10:47
Re: [FS] mabako\'s admin script - IMPROVED - by Nova - 26.07.2006, 18:16
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 26.07.2006, 19:13
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 26.07.2006, 21:44
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 26.07.2006, 21:50
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 26.07.2006, 22:59
Re: [FS] mabako\'s admin script - IMPROVED - by SpZ - 27.07.2006, 17:37
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 28.07.2006, 03:20
Re: [FS] mabako\'s admin script - IMPROVED - by DJDD - 28.07.2006, 14:25
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 28.07.2006, 14:36
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 28.07.2006, 14:58
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 28.07.2006, 19:42
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 29.07.2006, 03:12
Re: [FS] mabako\'s admin script - IMPROVED - by DJDD - 29.07.2006, 03:43
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 29.07.2006, 05:46
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 29.07.2006, 05:52
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 29.07.2006, 08:24
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 29.07.2006, 13:09
Re: [FS] mabako\'s admin script - IMPROVED - by yom - 29.07.2006, 13:33
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 29.07.2006, 13:57
Re: [FS] mabako\'s admin script - IMPROVED - by shad0wk1ng - 29.07.2006, 14:03
Re: [FS] mabako\'s admin script - IMPROVED - by DJDD - 29.07.2006, 14:28
Re: [FS] mabako\'s admin script - IMPROVED - by Roka - 29.07.2006, 14:56
Re: [FS] mabako\'s admin script - IMPROVED - by yellowblood - 29.07.2006, 14:59

Forum Jump:


Users browsing this thread: 4 Guest(s)