Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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.jailedtemp.timetemp.reason);
  }

DB NPC: JailDB
PHP Code:
function onActionServerSide() {
  if (
params[0] == "JailPlayer") {
    
player.chat "Jailed: "@params[1];
    
JailDB.injail.add(params[1SPC 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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:32 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.