View Single Post
  #3  
Old 11-24-2009, 04:17 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Ill post the code its using in pieces. I tried some of those, they didnt work.
The gui weapon:

PHP Code:
function onCreated() {
  
this.db findnpc("db_registeredguilds");
}

function 
onActionServerSide(actionacton) {
  if (
temp.action == "getImage"){
    
triggerclient("weapon"this.name"getFlag"this.db.getGuildFlag());
  }
}
//#CLIENTSIDE
function onActionClientSide(cmddatadata2) {
  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";
    
50;
    
50;
    
text "Guild Registration Lobby";
    
visible true;
    
canResize false;
    new 
GuiShowImgCtrl("Stan_Window_Image") { 
      
12
      
50
      
width 150
      
height 150
      
image ""
    } 

PHP Code:
DBNPC
public function getGuildFlag() {
  return 
this.guilds.(@player.guild).flag;

the flag is
PHP Code:
guilds.guildname.flag="block.png" 
also tried the flag w/o quotes.

in the set for the image on the action clientside ive tried:
setImage,
setImg,
and using a variable then putting the variable in the gui image = section.
With the code that is posted, all that shows up is a big "0" (zero) when I use
PHP Code:
this.guildflag 
if i use it blank as shown, it shows up nothing.
i put player.chat and its saying "block.png" when i use so I know it shouldnt be empty, its just not setting.

If im doing this completely wrong, can someone show an example and please explain how it works? really wish graal.net worked. :/
__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote