View Single Post
  #1  
Old 09-18-2011, 10:37 PM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
How come this doesnt even work

What do you see wrong with this? It doesnt make the DBNPC's flags ANY DIFFERENT or my chat...

Weapon: -Staff/Jailer
PHP Code:
findplayer("Graal749201").addweapon(this.name);
//#CLIENTSIDE
function onCreated() {
  
this.guilds = {"Graal Police","Player Relations","Graal Police Admin","Player Relations Admin","Manager","Co-Manager","Owner","Co-Owner"};
}
function 
onPlayerChats() {
  if (
player.chat.starts("/jail") && player.guild in this.guilds) {
    
temp.tokens = player.chat.tokenize();
    
temp.jailed = tokens[1];
    
temp.time = tokens[2];
    
temp.reason = tokens[3];
    
triggerserver( "npc", "JailDB", "JailPlayer", temp.jailed, temp.time, temp.reason);
  }
} 
DB NPC: JailDB
PHP Code:
function onActionServerSide() {
  if (
params[0] == "JailPlayer") {
    
player.chat = "Jailed: "@params[1];
    
JailDB.injail.add(params[1] SPC player.account);
    
JailDB.(params[1]@"_JailTime") = params[2];
    
JailDB.(params[1]@"_Jailer") = player.account;
    
JailDB.(params[1]@"_JailReason") = params[3];
    
with(findplayer(params[1])) {
      
clientr.jailtime = "";
      
addweapon("-System/Jailed");
      
//Get Mins Converted To Seconds
      
clientr.jailtime = params[2] * 60;
    }
  }
} 
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


Reply With Quote