function serverCmdpoints(%client){ commandToClient(%client, 'bottomPrint', "<color:FFFF00>You have" SPC %client.points SPC "points");}package test{ function gameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc, %y, %x) { parent::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc, %y, %x); %playername=%sourceClient.getPlayerName(); %killedname=%client.getPlayerName(); if(%sourceClient==0) { %playername="the enviroment"; } if(%client!=%sourceClient) { commandToClient(%sourceClient, 'centerPrint', "<color:FFFF00>You 0wn3d" SPC %killedname SPC "\nYou won 1 point",3,2); %client.centerPrint("<color:FFFF00>You died haha\nYou got 0wn3d by" SPC %playername SPC "\nYou lost 1 point",3,3); %client.points--; %sourceClient.points++; } else { commandToClient(%client, 'centerPrint', "<color:FFFF00>You died haha\nYou got 0wn3d by" SPC %playername SPC "\nYou lost 1 point",3,3); %client.points--; } %client.spawnPlayer(); serverCmdpoints(%client); serverCmdpoints(%sourceClient); echo(%sourceClient); echo(%playername); echo(%client); echo(%killedname); }}; activatePackage(test);
if(%client!=%sourceClient) { commandToClient(%sourceClient, 'centerPrint', "<color:FFFF00>You 0wn3d" SPC %killedname SPC "\nYou won 1 point",3,2); %client.centerPrint("<color:FFFF00>You died haha\nYou got 0wn3d by" SPC %playername SPC "\nYou lost 1 point",3,3); %client.points--; %sourceClient.points++; } else { commandToClient(%client, 'centerPrint', "<color:FFFF00>You died haha\nYou got 0wn3d by" SPC %playername SPC "\nYou lost 1 point",3,3); %client.points--; }
%client.schedule(%timeInMS,0,'centerPrint',%message,%timeInSeconds);
function serverCmdpoints(%client){ commandToClient(%client, 'bottomPrint', "<color:FFFF00>You have" SPC %client.points SPC "points");}package test{ function gameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc, %y, %x) { parent::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc, %y, %x); %playername=%sourceClient.getPlayerName(); %killedname=%client.getPlayerName(); %client.spawnPlayer(); if(%sourceClient==0) { commandToClient(%client, 'centerPrint', "<color:FFFF00>You got 0wn3d by gravity\nYou lost 1 point",3,2); %client.points--; } else if(%client!=%sourceClient) { commandToClient(%sourceClient, 'centerPrint', "<color:FFFF00>You 0wn3d" SPC %killedname SPC "\nYou won 1 point",3,2); %client.schedule(100,0,'centerPrint',"<color:FFFF00>You got 0wn3d by" SPC %playernamename SPC "\nYou lost 1 point",3); %client.points--; %sourceClient.points++; } else { commandToClient(%client, 'centerPrint', "<color:FFFF00>You got 0wn3d by yourself\nYou lost 1 point",3,3); %client.points--; } serverCmdpoints(%client); serverCmdpoints(%sourceClient); echo(%sourceClient); echo(%playername); echo(%client); echo(%killedname); }};
commandToClient(%sourceClient, 'centerPrint', "<color:FFFF00>You 0wn3d" SPC %killedname SPC "\nYou won 1 point",3,2);%client.schedule(100,0,'centerPrint',"<color:FFFF00>You got 0wn3d by" SPC %playernamename SPC "\nYou lost 1 point",3);
17561(%sourceClient)Olaf(%playername)7543(%client)MysteryGuy(%killedname)GameConnection(%sourceClient)Unable to find object "Olaf" attempting to call function "getClassName"(%playername)GameConnection(%client)Unable to find object "MysteryGuy" attempting to call function "getClassName"(%killedname)
echo(%sourceClient);echo(%playername);echo(%client);echo(%killedname);echo(%sourceClient.getClassName());echo(%playername.getClassName());echo(%client.getClassName());echo(%killedname.getClassName());
(...)package test{ function gameConnection::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc) { parent::onDeath(%client, %sourceObject, %sourceClient, %damageType, %damLoc); %playername=%sourceClient.getPlayerName(); %killedname=%client.getPlayerName();(...)
That is what happens with events, although it might just be to stop noobs to fire infinite projectiles in less than one second.
Well if you're not a handicapped who sets their projectile limit very high. It would also start a non-terminating loop.