PHP Code:
//By: Gambet
//Modified by Omega
function onActionServerSide() {
if ( params[0] == "addec" )
{
if ( params[2] != params[3] )
{
with ( findplayer( params[2] ) ) {
clientr.ec+=params[1];
player.chat = "You have received " @ params[1] @ " EC from " @ params[3] @"!";
}
player.chat = "You have just sent " @ params[1] @ " EC to " @ params[2] @"!";
}
else
{
player.chat = "You cannot give yourself EC!";
}
}
}
//#CLIENTSIDE
function onPlayerChats() {
if (player.guild == "Events Team" || player.guild == "Events Admin")
{
if (player.chat.starts("-addec") )
{
tokens = player.chat.tokenize();
this.addvalue = abs( tokens[1] );
this.adder = player.account;
this.addto = tokens[2];
if ( this.addvalue in |1,15| )
{
if ( this.addto != NULL )
{
triggeraction( 0, 0, "serverside", name, "addec", this.addvalue, this.addto, this.adder );
}
else
{
player.chat = "Invalid Syntax: /add <number_of_ec> <acc>";
}
}
else
{
player.chat = "Amount exceeds allowed range!";
}
}
}
}
Just load this in a weapon and give it to all players. :]
A friend gave this to me awhile ago. I figured I should share. I hope you enjoy it as much as I do.