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
  #1  
Old 04-09-2011, 04:38 AM
Astram Astram is offline
Era iPhone PR
Astram's Avatar
Join Date: Aug 2010
Posts: 324
Astram can only hope to improve
Send a message via AIM to Astram
Stealth Script Help

PHP Code:
//Please dont steal this script from the forums, forum viewers.
function onActionServerSide()
  {
  if (
params[0] == "stealth")
    {
    for (
players)
      {
      
this.admins = {"Owner","Events Team","LAT"};
      if (!(
p.guild in this.admins))
      {
      
p.triggerclient("gui",this.name,"stealth",params[2],params[1]);
      }
      else
      {
      
temp.p2 params[2];
      if (
findplayer(temp.p2).clientr.on 1)
      {
      
p.triggerclient("gui",this.name,"stealth",params[2],0.75);
      }
      else
      {
      
p.triggerclient("gui",this.name,"stealth",params[2],1);
      }
      }
    }
    }
  }
//#CLIENTSIDE
function onKeyPressed(codekeyscancode)
  {
  if (
key == "5")
    {
    
this.canuse = {"Owner","LAT"}; 
     if (
player.guild in this.canuse)
      {
    if (
this.on == false)
      {
      
this.on true;
      
triggerserver("gui",this.name,"stealth",0,player.account);
      
sleep(0.5);
      
player.alpha 0.75;
      
client.message.add("Stealth Mode On");
      }
    else
      {
      
this.on false;
      
triggerserver("gui",this.name,"stealth",1,player.account);
      
sleep(0.5);
      
player.alpha 1;
      
client.message.add("Stealth Mode Off");
      }
    }
  }
  }
function 
onActionClientSide()
  {
  if (
params[0] == "stealth")
    {
    
findplayer(params[1]).alpha params[2];
    }
  } 
This has been added to all players...
The problem is that the other admins who are defined in this.admins, only see us other stealthed admins with alpha 1, not alpha 0.75 which is a problem because you don't know if their in stealth, though other players can not see the player that is in stealth.
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!


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 01:24 AM.


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