Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   iv got a zoom script i need help with (https://forums.graalonline.com/forums/showthread.php?t=134256773)

GULTHEX 11-02-2009 06:01 AM

iv got a zoom script i need help with
 
this is the weapon

NPC Code:
//#CLIENTSIDE
function onWeaponFired()
{
if (this.on != true)
{
this.on = true;
player.attr[31] = "global_size.gani";
player.zoom = 6;
player.chat = "Zoom = On";
}
else
{
this.on = false;
player.attr[31] = "";
player.zoom = 1;
player.chat = "Zoom = Off";
}
}



and this is
global_size.gani

NPC Code:
function onPlayerEnters() {
if (params.size()>0)
this.setzoom = params[0];
player.zoom = this.setzoom;
}




But i cant figure Out how to make it Zoom so other people can see it.

Can sombody help me Please?

Tigairius 11-02-2009 06:08 AM

You have to add your zooming code into a gani script and attach the gani to the player.

Deas_Voice 11-02-2009 04:09 PM

you didn't send any params to the gani.
u should use your own gani scripts instead of taking the effectcards ganis.

GULTHEX 11-02-2009 05:49 PM

so i should do this?
 
so i should put player.zoom in the gani and put as an attribute?

cbk1994 11-02-2009 11:29 PM

The simplest GANI script would be something like

PHP Code:

SCRIPT
function onPlayerEnters() {
  
onCreated();
}
function 
onCreated() {
  
player.zoom 2;
}
SCRIPTEND 

You'd then do something like

PHP Code:

player.attr[8] = "mygani.gani"

GANI paramaters are passed through attributes using commas, like this:

PHP Code:

player.attr[8] = "mygani.gani,2"


Codein 11-03-2009 06:00 PM

Quote:

Originally Posted by cbk1994 (Post 1535959)
GANI paramaters are passed through attributes using commas, like this:

PHP Code:

player.attr[8] = "mygani.gani,2"


Oh my god, thankyou.

Switch 11-03-2009 06:19 PM

Quote:

Originally Posted by Codein (Post 1536144)
Oh my god, thankyou.

x2

"You must spread some Reputation around before giving it to cbk1994 again."

Deas_Voice 11-03-2009 07:02 PM

Quote:

Originally Posted by Switch (Post 1536153)
x2

"You must spread some Reputation around before giving it to cbk1994 again."

x3
also
x2, gotta spread too.

Codein 11-03-2009 08:54 PM

Quote:

Originally Posted by Deas_Voice (Post 1536169)
x3
also
x2, gotta spread too.

x3, gotta spread too.


All times are GMT +2. The time now is 09:16 AM.

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