Tokio Posted May 21, 2018 Posted May 21, 2018 i added this line to my script: takeWeapon( source, 38, 99999 ) buuut, does not working.. how to fix this?
Tokio Posted May 21, 2018 Author Posted May 21, 2018 42 minutes ago, MIKI785 said: Depends on where you put it, post rest of the code. function onSwitchToMinigun (previous, current) if ( current == 38 ) then local accName = getAccountName ( getPlayerAccount ( source ) ) if ( hasObjectPermissionTo(source, "function.kickPlayer") then else killPed(source) takeWeapon( source, 38) end end end addEventHandler("onPlayerWeaponSwitch", getRootElement(), onSwitchToMinigun )
DNL291 Posted May 21, 2018 Posted May 21, 2018 Your first code will just take the ammo. Firstlly, debug your code if you don't know where the error is. It can be because you're using takeWeapon after killPed, or maybe it has something wrong with hasObjectPermissionTo function.
MrKAREEM Posted May 25, 2018 Posted May 25, 2018 (edited) U Can Use That ITS Easy takeAllWeapons(source) -- For Take ALL takeWeapon( source, 17 ) -- IF U Want Take One Only With Id Edited May 25, 2018 by MrKAREEM
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