Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-08-2008, 07:27 AM
Rave_J Rave_J is offline
Graal Developer
Join Date: Feb 2006
Location: Texas
Posts: 848
Rave_J can only hope to improve
Send a message via AIM to Rave_J Send a message via MSN to Rave_J Send a message via Yahoo to Rave_J
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";


Last edited by Rave_J; 07-08-2008 at 07:57 AM..
Reply With Quote
  #2  
Old 07-08-2008, 08:01 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Rave_J View Post
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!";

__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 07-10-2008, 11:47 PM
warmaster70229 warmaster70229 is offline
Banned
Join Date: Jun 2007
Location: Texas ;D
Posts: 111
warmaster70229 is on a distinguished road
Send a message via AIM to warmaster70229 Send a message via MSN to warmaster70229 Send a message via Yahoo to warmaster70229
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
Reply With Quote
Reply


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 12:29 AM.


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