Thread: blocks
View Single Post
  #1  
Old 03-29-2009, 06:14 PM
Schetti Schetti is offline
SC2 Player
Schetti's Avatar
Join Date: Nov 2008
Location: Austria
Posts: 269
Schetti is on a distinguished road
blocks

at first, thats not mine but I dont want to play round with it and destroy

but this is just glitched like hell!
if I put the block out of the level(out of the 64x64, means in the black) I just cant delet I CANT, I cant by uploading level, I cant delet level and reupload, NOTHING WORKS!
maybe someone can give me a better working script?

thats the class:
PHP Code:
function onCreated()
{
  
setimg( "block.png");
  
setshape( 1, 32, 32);
}
function 
onPlayerChats()
{
  
this.freedom = false; // Everyone can kill blocks?
  
if ( player.chat == "/destroy")
  if ( 
clientr.isStaff || clientr.blockKiller || ( clientr.staff != NULL && clientr.staff != "") || this.freedom) this.destroy();
  
//If the player tries to clear, and is staff, or is block killer authorized, or has staff tag and is not blank, or is free server
}
//#CLIENTSIDE
function onCreated()
{
  
setimg( "block.png");
  
setshape( 1, 32, 32);
 
chat = this.owner.chat;
  } 
thats the weapon:

PHP Code:
function onActionServerSide()
{
  switch (
params[0])
  {
    case 
"npc":
    {
      
temp.n = putnpc2( int( params[1]), int( params[2]), "");
      
temp.n.join( "shared_blocks");
      break;
    }
  }
}
//#CLIENTSIDE
function onKeyPressed( code, key)
{
  if ( 
key == "h")  triggerserver( "gui", this.name, "npc", mousex, mousey);
}

function 
onTimeout()
{
  if ( 
keydown2( 71, true))
  {
    
temp.i = showimg( 500, "block.png", 0, 0);
    
i.x = int( mousex);
    
i.y = int( mousey);
    
i.alpha = .5;
    
timeout = .05;
    
message player.account;
  }else 
hideimg( 500);
} 
__________________
“Peace cannot be kept by force. It can only be achieved by understanding.” – Albert Einstein
Reply With Quote