Jump to content
  • 0

Check if has backpack


Mochan

Question

I have a script where donators can select from a list of skins but there backpack disappears, ofc I could write a hint to drop there bag, but instead I was wondering if I could do a if statement i.e

 

if(isBackpack) { 

 

hint" Please drop ur bag"

 

else

 

execVm changeclothes.sqf

 

I amen't the best scripter, but im sure you catch my drift.

 

Mochan

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

you can do like this:

//units bag
_myBackpack = unitBackpack player;
//units bag type
_packtype = (typeOf _myBackpack);
//check if there is a bag name
if (_packtype !="") then {

i belive if you dont need units backpack type, you can do this:

//units bag
_myBackpack = unitBackpack player;
//check if units bag isnull
if !(isnull _myBackpack) then {
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...