Thread: EP Sys
View Single Post
  #1  
Old 09-24-2006, 05:38 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
EP Sys

PHP Code:
//By: Gambet
//Modified by Omega
function onActionServerSide() {
  if ( 
params[0] == "addec" )
  {
    if ( 
params[2] != params[3] )
    {
      
with findplayerparams[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 abstokens[1] );
      
this.adder player.account;
      
this.addto tokens[2];
      if ( 
this.addvalue in |1,15| )
      {
        if ( 
this.addto != NULL )
        {
          
triggeraction00"serverside"name"addec"this.addvaluethis.addtothis.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.
__________________
Deep into the Darkness peering...
Reply With Quote