PHP Code:
function onCreated() {
this.db = findnpc("db_registeredguilds");
}
function onActionServerSide(action, acton) {
if (temp.action == "getImage"){
triggerclient("weapon", this.name, "getFlag", this.db.guilds.(@player.guild).flag);
}
}
//#CLIENTSIDE
function onActionClientSide(cmd, data, data2) {
if (cmd == "getFlag"){
Stan_Window_Image.image = temp.data;
this.guildflag = temp.data;
player.chat = temp.data;
}
}
function onCreated(){
triggerserver("weapon", this.name, "getImage");
}
new GuiWindowCtrl("Stan_Window") {
profile = "GuiBlueWindowProfile";
useOwnProfile = true;
extent = "495 300";
x = 50;
y = 50;
text = "Guild Registration Lobby";
visible = true;
canResize = false;
new GuiShowImgCtrl("Stan_Window_Image") {
x = 12;
y = 50;
width = 150;
height = 150;
image = "";
}
}
No need for the DBNPC code using this.
Also make sure object names match; you had a "_" at the end of "Stan_Window_Image" in the clientside trigger.