Originally Posted By: Siwler
Code Fixed by: Quad. Thank You

Please read the entire post before taking action, if any action taken by you.

For pricing and How I pay see first post.

"Please Do Not Post, Replay Or Comment On Or To This Post." PM me if you have any questions.

Here is what I'm trying to do with this code. I want to attach action buy_items to armor or weapon etc, as soon as item is bought to activate armors or weapons function.
In this case I'm trying to activate t_shooter_armor function witch is located in another .c file t_shooter_weapons.c
I tried #include t_shooter_weapons.c and .h I even copied entire t_shooter_armor code to this file that I.m working on. I can buy armor but cant activate armors function.

How do I do this? PM me with the fixed code or upgraded code Thank You.

Code:
action buy_items()
{
	my.emask |= ENABLE_CLICK;
	my.event = buy_me;
}

function buy_me()
{
	if (event_type != EVENT_CLICK || cash < my.skill1) {return;}
	if (my.skill2 == 0) {my.skill2 = 0;}
	cash -= my.skill1;
	snd_play (spentcash_snd, 70, 0);
	set (my, PASSABLE);
        set (my, INVISIBLE); 
        ent_create(armor_mdl, NULL, t_shooter_armor);
	wait (1);
	
}


I had to Quote my own post(thanks to people who can't follow simple instructions) to let everyone know that above Code has been fixed by Quad. Thank You.


Honesty will get you far, were dishonesty will get you only so far in life.