Home   Help Search Login Register  

Author Topic: can you do this?  (Read 638 times)

0 Members and 1 Guest are viewing this topic.

marcus3

  • Guest
can you do this?
« on: 18 Mar 2005, 14:36:35 »
I need it where when you walk up to some one they say something.
But when you walk up to them with a gun they say something different. But I don't want to right all the guns one by one in the script so  I use a array like this
When you walk up to guy script runs and I the script there is this

Stuff he wood say if you did not have gun.

@ (Man hasweapon guns)

Man sidechat "don't shoot"



And in the init script there is this.

Guns = "gun" and "gun" and "gun" and "gun"

gun is like "ak47" (but I am lazy to Wright all the gun names in there)

So when I do this it don't work.
 why not can you help?

thanks


StonedSoldier

  • Guest
Re:can you do this?
« Reply #1 on: 18 Mar 2005, 14:46:59 »
trying guns = "gun" + "gun" + "gun" would form a string not a array, try something like this

Code: [Select]
_man = _this select 0

?(count weapons _man)<1:_man globalchat "IM UNARMED"
?(count weapons _man)>0:_man globalchat "I HAVE A GUN, SUCKER"

marcus3

  • Guest
Re:can you do this?
« Reply #2 on: 22 Mar 2005, 00:38:15 »
i think i just need to not lazy and just typ in all the stuff.
thanks for the help