27.07.2006, 17:37
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:
Haven\'t tested it yet, but it should work, because they are just a few minor changes of /givemoney.
Also add this line:
Below this line:
And this in the Help.EN:
Tell me if there are bugs, as I said, i haven\'t tested it yet. I\'m on holiday..
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;
}
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);} }
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);} }
Quote:
setmoney-help 0 USAGE: %ssetmoney [playername] [amount] setmoney-help 0 Sets the user\'s money to the specified amount. |