81
« on: August 25, 2014, 11:09:47 AM »
It runs no errors, but features like, find client by name and invalid name are not functioning whatsoever, i changed something, everything stopped working and now i can't figure it out anymore
function serverCmdGrantmoney(%client,%money,%name)
{
if(%client.isSuperAdmin)
{
if(%name !$="")
{
if(isObject(%target = findClientByName(%name)))
{
if(%target != %client)
{
messageClient(%client, '', "<font:impact:20><color:ffffff>You grant <color:006600>$" @ %money SPC "\<font:impact:20><color:ffffff>to " @ %target.name @ ".");
messageClient(%target, '', "<color:ffffff>An admin has granted you <color:006600>$" @ %money @ "<color:ffffff><font:impact:20>.");
}
else
messageClient(%client, '', "\c6You grant yourself \c3$" @ %money @ "\c6.");
%target.score+=%money;
}
else
%client.chatMessage("Player not found");
}
else
%client.chatMessage("<color:ffffff><font:impact:20>You grant yourself <color:006600>$" @ %money);
%client.score+=money;
else if(isObject(%client.player))
if(isObject(%target))
{
messageclient(%client, '', "<color:ffffff><font:impact:20>You grant <color:006600>$" @ %money SPC "<color:ffffff><font:impact:20>to" SPC %target.name @ "<color:ffffff><font:impact:20>.");
messageClient(%target, '', "<color:ffffff>An admin has granted you <color:006600>$" @ %money @ "<color:ffffff><font:impact:20>.");
%target.score+=%money;
}
}
}
else
messageClient(%client, '', "<color:ffffff><font:impact:20>You must be super admin to use the this command.");
}