HoLsTeN Posted April 25, 2012 Share Posted April 25, 2012 hi guys, its me again. A simple problem No Error in the debugscript 3 function WeaponsNo_ ( previousWeaponID, currentWeaponID ) if ( getElementInterior(source) ~= 0 ) then if currentWeaponID == 16 or 39 or 17 then toggleControl ( source, "fire", false ) outputChatBox("Change The Wepaons You Cant use this wepaon here",source,0,255,0) else toggleControl ( source, "fire", true ) end end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), WeaponsNo_ ) help <> Link to comment
Axel Posted April 25, 2012 Share Posted April 25, 2012 This should work: function noweps ( previousWeaponID, currentWeaponID ) if ( getElementInterior(source) == 0 ) then if (currentWeaponID == 16 or currentWeaponID == 39 or currentWeaponID == 17) then toggleControl ( source, "fire", false ) outputChatBox("Change the weapons you cant use this weapon here.",source,0,255,0) else toggleControl ( source, "fire", true ) end end end addEventHandler ( "onPlayerWeaponSwitch", getRootElement(), noweps ) (tested) Link to comment
HoLsTeN Posted April 25, 2012 Author Share Posted April 25, 2012 thank you dude it is worl Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now