View Single Post
  #5  
Old 04-09-2011, 03:56 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
Okay im going to post my stealth script here, because it needs the work on it.
PHP Code:
function onActionServerSide()
  {
  if (
params[0] == "stealth")
    {
    for (
p : players)
      {
      if (
p.guild != "Owner")
      {
      
p.triggerclient("gui",this.name,"stealth",params[2],params[1]);
      }
      else
      {
      if (
findplayer(params[2]).this.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(code, key, scancode)
  {
  if (
key == "5")
    {
     if (
player.guild in this.admins)
      {
    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.admins = {"Owner","Events Team"}; 
This is added to all players
and
I want to change
PHP Code:
 if (p.guild != "Owner")
      { 
to
PHP Code:
if (!(p.guild in this.admins)) 
but it wont work
__________________
-Toad
The worlds biggest Toad fan...
Era iPhone FTW!



Last edited by Astram; 04-09-2011 at 03:59 AM.. Reason: fixd PHP tags
Reply With Quote