Thread: removeweapon()
View Single Post
  #1  
Old 07-07-2008, 10:57 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
removeweapon()

Well, there's something weird about it..

lets see

PHP Code:
function onActionPlayerOnline() {
  
temp.weps player.weapons;
  
temp.0;
  for(
temp.wep weps) {
    echo(++ 
i SPC wep.name);
  }

(In this case it echoed 28 weapons)

This echoes all the player's weapons on login. However.. If I try to remove all weapons on login, something weird happens..

PHP Code:
function onActionPlayerOnline() {
  
temp.weps player.weapons;
  
temp.0;
  for(
temp.wep weps) {
    
removeweapon(wep.name);
    echo(++ 
i SPC wep.name);
  }

It only echoes 14 weapons and removes those that were echoed..

So to get all weapons removed you have to reconnect like.. >5 times o.o;;

Why is this? Anyone knows?
__________________

Last edited by Chompy; 07-07-2008 at 11:13 PM.. Reason: fixed typo
Reply With Quote