View Single Post
  #12  
Old 05-12-2012, 11:11 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Emera View Post
Might be a little easier to put them all in an array instead of using multiple removeweapon() functions. It doesn't really make a difference, but it looks nicer.

PHP Code:
function onCreated() {
  
this.weapons_rem = {
    
"-System",
    
"-Other",
    
"Weapons/Here"
  
};
}

function 
onActionPlayerOnline() {
  for (
weapons this.weapons_rem) {
    
player.removeweapon(weapons);
  }

I don't see the need to permanently store the weapons array, and you should *REALLY* give your weapons string a temp header.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote