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.putnpc2(player.0.5player.1"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 1) {
    
temp.putnpc2(player.1.5player.1"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 2) {
    
temp.putnpc2(player.0.5player.2.5"");
    
temp.i.join("classname");
  }
  else if (
player.dir == 3) {
    
temp.putnpc2(player.2.5player.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