Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   K Stuck on yhis script (https://forums.graalonline.com/forums/showthread.php?t=80402)

Rave_J 07-08-2008 07:27 AM

K Stuck on this script
 
kk im working on this shopping system for my server
pretty much what u do is click on the npc the gui pops up
and u hit buy or close

now i got the opening the gui to display when u click but idk how to make it where u can click the buy to buy the item or what can someone help me ?
I have this so far ?

PHP Code:

//#CLIENTSIDE
function onCreated(){
destroy();
}
function 
onActionLeftMouse(){
new 
GuiBitmapCtrl("Shopping-Menu") {
  
10;
  
10;
  
widith 160;
  
height 80;
  
bitmap "shopping_gui.png";



Tigairius 07-08-2008 08:01 AM

Quote:

Originally Posted by Rave_J (Post 1401456)
kk im working on this shopping system for my server ...


PHP Code:

//#CLIENTSIDE
function onCreated(){
  
destroy();
  new 
GuiBitmapButtonCtrl ("Shopping-Menu") {
    
width 160;
    
height 80;
    
position "10 10";
    
pressedbitmap normalbitmap "shopping_gui.png";
    
setbitmap("shopping_gui.png"1);
  }
}

function 
Shopping-Menu.onAction() {
  
player.chat "I clicked it!";



warmaster70229 07-10-2008 11:47 PM

Hmm, might just be me, but won't a destroy(); on the client side in the created method remove the weapon from the player?

Just a thought >_<


All times are GMT +2. The time now is 07:46 AM.

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