xeon17 Posted May 10, 2014 Posted May 10, 2014 How i can dissable weapons in interiors ? if possible in every interior ,or only in banks. A unique GangWar gamemode waiting for you!Click here for more information.
xeon17 Posted May 10, 2014 Author Posted May 10, 2014 this ? addEventHandler("onPlayerDamage", root, function ( player ) if ( getElementInterior( player ) then cancelEvent() end A unique GangWar gamemode waiting for you!Click here for more information.
xeon17 Posted May 10, 2014 Author Posted May 10, 2014 fast A unique GangWar gamemode waiting for you!Click here for more information.
justn Posted May 10, 2014 Posted May 10, 2014 addEventHandler("onPlayerDamage", root, function ( player ) if ( getElementInterior( player ) ) then cancelEvent() end end) Datastore - Store data to a database quickly. (Useful for saving scripted tables)
cheez3d Posted May 10, 2014 Posted May 10, 2014 onPlayerDamage - Canceling this event has no effect. Cancel the client-side event onClientPlayerDamage instead. + that if statement will always get executed as the getElementInterior function returns an integer (which is ≠ nil or false).
LonelyRoad Posted May 10, 2014 Posted May 10, 2014 addEventHandler("onClientPlayerDamage", root, function(player) if (getElementInterior(player) > 0) then cancelEvent() end end) The above code should work, run it client side.
xeon17 Posted May 10, 2014 Author Posted May 10, 2014 No work , when player enter an interior he still can use his weapons.. i want just he can't shot. tried to take his weapon , it worked really bad. A unique GangWar gamemode waiting for you!Click here for more information.
LonelyRoad Posted May 10, 2014 Posted May 10, 2014 That will at least prevent any damage from when someone is attacked inside an interior. Preventing the player equipping a weapon, I suppose could be done with this event OnPlayerWeaponSwitch and with function setPedWeaponSlot.
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