View Single Post
  #2  
Old 05-24-2009, 04:11 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
You should really indent your code, it helps us (and you) read the script easier,.

Basically the GS2 equivalent is:

PHP Code:
function onWeaponFired()
{

  
play("put.wav");
  
player.bombs--;

  if (
player.dir == 0) {
    
temp.i = putnpc2(player.x + 0.5, player.y - 1, "");
    
temp.i.join("classname");
  }
  else if (
player.dir == 1) {
    
temp.i = putnpc2(player.x - 1.5, player.y + 1, "");
    
temp.i.join("classname");
  }
  else if (
player.dir == 2) {
    
temp.i = putnpc2(player.x + 0.5, player.y + 2.5, "");
    
temp.i.join("classname");
  }
  else if (
player.dir == 3) {
    
temp.i = putnpc2(player.x + 2.5, player.y + 1, "");
    
temp.i.join("classname");
  }

} 
Now all you have to do is add the script for the bomb inside the class from the .txt file.

Also, it should be:
serverwarp(this.selectedserverconnect);
Reply With Quote