zRiaan Posted December 27, 2017 Share Posted December 27, 2017 what to do when the player performs some kind of command and he can not shoot? for example: He types /pro and can not but shoot Link to comment
Dimos7 Posted December 27, 2017 Share Posted December 27, 2017 You mean diasble damage by a command? Link to comment
Storm-Hanma Posted December 28, 2017 Share Posted December 28, 2017 Try this will work , https://community.multitheftauto.com/?p=resources&s=details&id=15095 Link to comment
Storm-Hanma Posted December 28, 2017 Share Posted December 28, 2017 Use this if you want only weapon function setPedWeaponSlot(localPlayer, 0) Link to comment
ÆBKV Posted January 2, 2018 Share Posted January 2, 2018 (edited) -- CLIENT -- addEventHandler("onClientPlayerDamage",root, function() if getElementData(source,"godmode") then cancelEvent() end end ) addEventHandler("onClientPlayerStealthKill",localPlayer, function(player) if getElementData(player,"godmode") then cancelEvent() end end ) -- SERVER -- addCommandHandler("godmode", function(player) if not getElementData(player,"godmode") then setElementData(player,"godmode",true) outputChatBox("Godmode: #00FF00enabled",player,255,255,255,true) else setElementData(player,"godmode",false) outputChatBox("Godmode: #FF0000disabled",player,255,255,255,true) end end ) -- META -- <meta> <script src="client.lua" type="client" /> <script src="server.lua" type="server" /> </meta> Edited January 2, 2018 by ÆBKV 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