Not at all, I want player to let him equip Minigun only if he has 8 or more strength and this script allows him to equip it even with 5 STR. I think "if player.getEquipped WeapMinigun == 1" is wrong, because it shouldn't be if he has already equipped gun, but when he want to equip, so that formula should be later. And 2nd thing is I want to have ShowMessage only when player has less than 8 STR. I know, it sounds complicated :/
Well.
Here is some code. Some points about it:
In the past, I used a script tool Cipscis made to test the efficiency of "getequipped" as compared with "isweaponinlist". There was a large difference in the amount of cpu being used between these 2 script commands. Getequipped was an inefficient CPU hog when compared with isweaponinlist for this purpose.
When you are forcing minigun unequips, you want to account for both the real minigun + the unique version of the minigun that comes out of MS18 from the Reilly's Rangers quest anyway. The "RepairMinigun" formlist as it works in the vanilla game works well enough for that.
So, here is some code that's based upon the Azar code and may help with what you are doing. I've never used the SpeedMult thing in a script so I don't know if this does what you expect.
short SpeedMultLoweredbegin gamemodeif player.isweaponinlist RepairMinigun ; if the player has any minigun equipped if player.getav strength < 8 ; but he's too weak to be doing that player.unequipitem WeapMinigun player.unequipitem WeapUniqueMS18Minigun elseif SpeedMultLowered == 0 ; if he's strong enough to equip it but he hasn't had his speed multiplier adjusted yet set SpeedMultLowered to 1 player.modav SpeedMult -50 endifelseif SpeedMultLowered ; he's not equipping a minigun but he's been affected by a speed mult change earlier set SpeedMultLowered to 0 player.modav speedmult 50endifend