Author Topic: /give score (amount) addon  (Read 752 times)

Is there a addon that lets you do /givescore (amount) and it lets you give that player that amount of score.
What I mean, is that it takes the score from your score.
Thanks

Code: [Select]
function serverCmdGiveScore(%cl,%amt,%a,%b,%c,%d,%e,%f,%g,%h,%i,%j,%k)
{
%amt = mFloor(%amt);
if(%amt <= 0)
return;
if(%amt > %cl.score)
{
messageClient(%cl,'',"You don't have that many points");
return;
}
%name = trim(%a SPC %b SPC %c SPC %d SPC %e SPC %f SPC %g SPC %h SPC %i SPC %j SPC %k);
%reciever = findClientByName(%name);
if(!isObject(%reciever))
{
messageClient(%cl,'',"Client not found");
return;
}
%reciever.incScore(%amt);
%cl.incScore(-%amt);
messageClient(%cl,'',"You gave " @ %reciever.getPlayerName() @ " " @ %amt @ "point" @ (%amt != 1 ? "s" : ""));
messageClient(%reciever,'',%cl.getPlayerName() @ " gave you " @ %amt @ "point" @ (%amt != 1 ? "s" : ""));
}

something like this could probably work for you