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

Great job, YB! But I\'ve got a problem: I\'ve configured mabako\'s script already to all my needs, so now I have to insert yours.. that could take a while.

I\'ve got another improvement, which I think is quite useful:

pawn Code:
else if (strcmp(command, "setmoney", true) == 0 && CL_givemoney != -1 && Level[playerid] >= CL_givemoney)
    {
      new xid[256],value,val_ue[256];
        xid = admin_strtok(cmdtext, index);

        val_ue = admin_strtok(cmdtext, index);
        value = strval(val_ue);

        if(!strlen(xid) || value == 0 || !strlen(val_ue)) { GetHelp(playerid,"setmoney-help"); return 1; }

        new lookupid;
        if(NameLookup(playerid,xid,lookupid,1) != 1) return 1;
        if(LevelWarning(playerid,lookupid,command,0) == 1 && value < 0) { LevelWarning(playerid,lookupid,command,1); return 1; }

        SuccessMessage(playerid,lookupid,command,"",val_ue,1);
        GivePlayerMoney(lookupid,value-GetPlayerMoney(lookupid));

        if(value > 0) {
  format(temp2,sizeof(temp2),"Your money has been set to $%d by %s",value,Name[playerid]);
         SendClientMessage(lookupid,COLOR_WHITE,temp2);
     }
        format(temp2,sizeof(temp2),"You set %s\'s to $%d",Name[lookupid],value);
        SendClientMessage(playerid,COLOR_WHITE,temp2);

      return 1;

    }
Haven\'t tested it yet, but it should work, because they are just a few minor changes of /givemoney.

Also add this line:
pawn Code:
if(Level[playerid] >= CL_givemoney && CL_givemoney != -1) { format(temp,sizeof(temp),"%s %s%s",temp,prefix,"setmoney"); thisline++; if(thisline % 5 == 0) { SendClientMessage(playerid, COLOR_WHITE,temp); temp = GetHelp(playerid,"help2",1);} }
Below this line:
pawn Code:
if(Level[playerid] >= CL_givemoney && CL_givemoney != -1) { format(temp,sizeof(temp),"%s %s%s",temp,prefix,"givemoney"); thisline++; if(thisline % 5 == 0) { SendClientMessage(playerid, COLOR_WHITE,temp); temp = GetHelp(playerid,"help2",1);} }
And this in the Help.EN:

Quote:

setmoney-help 0 USAGE: %ssetmoney [playername] [amount]
setmoney-help 0 Sets the user\'s money to the specified amount.

Tell me if there are bugs, as I said, i haven\'t tested it yet. I\'m on holiday..
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: 1 Guest(s)