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? My servers: Fun: Derby(DD):
MIKI785 Posted May 21, 2018 Posted May 21, 2018 Depends on where you put it, post rest of the code. Lua Scripter Owner of mshost.cz MTA portal.
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 ) My servers: Fun: Derby(DD):
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. Please do not PM me with scripting related question nor support, use the forums instead.
LilDawage Posted May 22, 2018 Posted May 22, 2018 or use setPedWeaponSlot ( source,) RPG/CnR servers Developer , You want help ? contact me on discord >>>lilDawage#8508<<< i'm at your Service 10/24 hours 7/7 days , >>>Welcome<<< Asking Discord Channel JOIN US ON here , you are welcome 10/24 active
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