this is supposed to make the player buy weapon when he activates a surface, if he has the money... why doesn't it work? 
        
[This message has been edited by JediJigge (edited January 05, 2002).]
                
                
            Code:
        
    symbols
message	activated
message	startup
thing		player				   local
surface	mp5buy linkid=1
flex		mp5cost=20				   local
end
#-----------------------------------------------------------
code
startup: 
player = GetLocalPlayerThing();
#-------
activated:
if(GetSenderRef() == mp5buy);
{
 if(GetInv(player, 119) => mp5cost);
    {
     if(GetInv(player, 3) > 0) //already have the weapon?
       {
        SetInv(player, 116, 30);
        jkPrintUNIString(player, 116);
       }
    
     else
	 {
	 SetInv(player, 3, 1);
	 SetInv(player, 116, 30);
	 SetInv(player, 119, -20);
	 jkPrintUNIString(player, 3);
	 }
    }
 else
	jkPrintUNIString(player, 120);
}
	Return;
end[This message has been edited by JediJigge (edited January 05, 2002).]
