Trouble in an 'if' statement.

Sandbird

Valued Member!
I got this : _wpn_type = configName _weapon; that runs in a loop and produces weapon names to an admin panel.
I want to make an if statement that checks for the string in _wpn_type and if it starts with "ItemKey" then ignore the if statement.
Epoch server has alot of ItemKeyXXXX where XXXX is a name...i and i want to ignore them all.

Any info on which command to search for ?
 
I think i figured it out..

_name = toArray _wpn_type;
_name resize 7;
if (toString _name != "ItemKey") then {
{show the weapons...}
}

but still is there any command that does that automatically ? like fs_checkin(ItemKey, _wpn_type) to give true or false?
 
DayZ includes the function fnc_inString to determine if a certain text is inside a string (script file is in \compile\fn_inString.sqf). I think this is what you're looking for.
 
Back
Top