Jump to content

Dual weapons


Recommended Posts

Posted

السلام عليكم

كيف اسوي الساون اوف واليوزي سلاح واحد؟

اعرف اني لازم استخدم

setWeaponProperty 

انا سويته كذا

function Dual ( ) 
    for index, player in ipairs(getElementsByType("player")) do 
        setWeaponProperty(22, "pro", "flags", 0x000800) 
        setWeaponProperty(26, "pro", "flags", 0x000800) 
        setWeaponProperty(28, "pro", "flags", 0x000800) 
    end 
end 
addEventHandler("onResourceStart", resourceRoot, Dual) 

بس انا مابي احد يقدر يستخدمه اببد

Posted
setPedStat 

عرفت كيف احلها

setWeaponProperty(22, "pro", "flags", 0x000800, false) 
setWeaponProperty(26, "pro", "flags", 0x000800, false) 
setWeaponProperty(28, "pro", "flags", 0x000800, false) 

بس ابي ايفنت لها, عشان مَ احد يستخدمها

بسس وش الايفنت اللي احتاجها؟

Posted

[url=https://wiki.multitheftauto.com/wiki/OnWeaponFire]https://wiki.multitheftauto.com/wiki/OnWeaponFire[/url] ---- serverside 
  
  
او 
  
[url=https://wiki.multitheftauto.com/wiki/OnClientPlayerWeaponFire]https://wiki.multitheftauto.com/wiki/On ... WeaponFire[/url]  ---- clientside 
  
triggerServerEvent 
Posted
WeaponID = { 
    [22] = false, 
    [26] = false, 
    [28] = false, 
} 
  
function Dual (previousWeaponID, currentWeaponID) 
    if WeaponID[currentWeaponID] then 
        setWeaponProperty(22, "pro", "flags", 0x000800, false) 
        setWeaponProperty(26, "pro", "flags", 0x000800, false) 
        setWeaponProperty(28, "pro", "flags", 0x000800, false) 
    end 
end 
addEventHandler ( 'onPlayerWeaponSwitch', getRootElement ( ), Dual) 

Thanks all, fixed it by myself :]

Resolved

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...