umm why doesn't this work???Code: [Select]function serverCmdsetCash(%client, %n) { if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) { %client.cash += %n; commandToClient(%client, 'centerPrint', "You currently have $" @ %client.cash,3); }}
function serverCmdsetCash(%client, %n) { if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) { %client.cash += %n; commandToClient(%client, 'centerPrint', "You currently have $" @ %client.cash,3); }}
function serverCmdsetCash(%client, %n) { if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) { %client.cash += %n; %client.centerPrint("You currently have $" @ %client.cash, 3); }}
Does the console give any error?Otherwise, place an echo to find out where it goes wrong.echo("Hello i am an echo lol");
function serverCmdsetCash(%client, %n) {echo("Hello i am an echo lol1"); if(%client.isAdmin && %n !$= mFloatLength(%n, 0) && %n <= 0) { echo("Hello i am an echo lol2"); %client.cash += %n; echo("Hello i am an echo lol3"); centerPrint("You currently have $" @ %client.cash,3); echo("Hello i am an echo lol4"); } echo("Hello i am an echo lol5");}
Blockhead spawned.Hello i am an echo lol1Hello i am an echo lol5%
&& %n !$= mFloatLength(%n, 0) && %n <= 0
Wups, forgot the %client in front. >_<
function serverCmdsetCash(%client, %n) { if(%client.isAdmin && %n $= mFloatLength(%n, 0) && %n >= 0) { %client.cash += %n; %client.centerPrint("You currently have $" @ %client.cash, 3); }}