Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 06-30-2011, 11:27 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I don't see any real reason why you would want the 'player' object to draw it anyway. I would do something like this:

Weapon: -GUI

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.gui this;
}

public function 
showRect(idxywidthheight) {
  
showpoly(id, {xyx+widthyx+widthy+heightxy+height});
  
player.chat "Nice rectangle!";

In other scripts you should be able to do:

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
player.gui.showRect(2000064 64);

Honestly though I would just make the function public in the GUI and call the GUI directly instead of using a player function. I.e:

(@"-GUI").showRect(...);
__________________
Quote:
Reply With Quote
 


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 08:58 PM.


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