Ok, ive got it working when it echos in the rc, but having problems showing it up in the gui.
I have this in a weapon, under clientside. Ill only be posted whats appropriate to the code needed.
PHP Code:
function onActionClientSide(cmd, data, data2) {
if (cmd == "theAbyss"){
Stan_WindowText.setText(@ temp.data);
}
}
To change the text on the actionclientside, using and
PHP Code:
public function Stan_Window_Leave.onAction(){
Stan_WindowText.setText("Top 5 in The Abyss:");
onCreated();
triggerserver("weapon", this.name, "getAbyss");
}
to trigger the server to grab the info from the dbnpc, and this serverside
PHP Code:
function onActionServerSide(action, acton) {
if (temp.action == "getAbyss") {
triggerclient("weapon", this.name, "theAbyss", this.db.getTopAbyss());
}
}
Then in the dbnpc,
PHP Code:
public function getTopAbyss(){
// Initialize Array and Kills Structure
temp.guildzname = getGuildList();
// Loop and Display Kills
for (temp.g: temp.guildzname) {
temp.kills = this.guilds.(@temp.g).kills;
temp.data = temp.g @ "'s kills: " @ temp.kills;
}
return temp.data;
}
All i can get it to show in the gui is the last of all the guilds and its kills, cant figure out why, if the echo in rc worked fine.