Tokio Posted May 21, 2018 Share Posted May 21, 2018 i added this line to my script: takeWeapon( source, 38, 99999 ) buuut, does not working.. how to fix this? Link to comment
MIKI785 Posted May 21, 2018 Share Posted May 21, 2018 Depends on where you put it, post rest of the code. Link to comment
Tokio Posted May 21, 2018 Author Share 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 ) Link to comment
DNL291 Posted May 21, 2018 Share 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. Link to comment
LilDawage Posted May 22, 2018 Share Posted May 22, 2018 or use setPedWeaponSlot ( source,) Link to comment
MrKAREEM Posted May 25, 2018 Share 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 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