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 08-21-2009, 12:49 AM
littlekinky littlekinky is offline
Registered User
littlekinky's Avatar
Join Date: Sep 2007
Posts: 185
littlekinky has a little shameless behaviour in the past
Showing symbol (What's wrong ?)

Ok i have this script i took the icon script that cbk provided and i wanted it to show a symbol when the weapon is fired please help me out ?

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
this.On false;
  
setTimer0.1 );
}

function 
onWeaponFired()
{
  
this.On this.On;
}

function 
onCreated() { 
  for (
temp.pl players) {
    
showimg(200 pl.id"stafficonimage.png",player.- -0.4player.- -3.3);;
    
changeimgvis(200 pl.id0);
    
changeimgcolors(200 pl.id1007);
  }
  
  
setTimer(0.05);

Reply With Quote
  #2  
Old 08-21-2009, 01:15 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
You have to show the image at the object's x/y not the player's x/y, so you would do it like this:
PHP Code:
    showimg(200 pl.id"stafficonimage.png",pl.0.4pl.3.3);
    
changeimgvis(200 pl.id0);
    
changeimgcolors(200 pl.id1007); 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #3  
Old 08-21-2009, 01:18 AM
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
You have the onCreated function defined twice, the second one should be onTimeout.

Your script also looks like a couple scripts grafted together.

Bookmark: http://www.graal.net/index.php/GScript

Read the tutorials on that page as well.
__________________
Quote:
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 01:47 PM.


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