Jump to content

x[سؤال ]x


Recommended Posts

السلام عليكم و رحمه الله و بركاته

عندي استفسار بسيط 

الحين الكود 

setWeaponProperty

يغير قوه السلاح او رينج السلاح او او او الخ..

لكل السيرفر

انا  ابي اغيره للاعب واحد بس كيف ممكن اسويها ؟

مكتوب بالويكي لو حطيتها بالكينت ( تستخدم لصناعه الاسلحه بس ) وش الحل ؟

Edited by Bassam*Syria
Link to comment
On 6/9/2017 at 21:09, #_iMr.[E]coo said:
  • "weapon_range" - float
  • "target_range" - float
  • "accuracy" - float
  • "damage" - int
FROM VERSION 1.4 r6693 ONWARDS
  • "fire_rotation" - vector - For aligning fire direction with model

يبوي الكود يغير لكل السيرفر 

ابي اغيره للاعب واحد بس 

 

شسالفه ماحد يعلق بشي مفيد ؟

Link to comment

دي طريقه جربها و قلي

addEventHandler ( 'onPlayerDamage' , root ,
function ( Attacker , _ , _ , Loss )
	if ( Attacker and getElementType ( Attacker ) == 'player' ) then 
		local Data = getElementData ( Attacker , 'Loss' ) 
			if ( ( Loss - Data ) < 1 ) then 
				killPed ( source , Attacker )
			else
				setTimer ( setElementHealth , 50 , 1 , source , getElementHealth ( source ) - Data )
			end
		end
	end
end )

 

Edited by #Soking
Link to comment

جرب طريقتي , 

addEventHandler ( 'onClientWeaponFire' , root ,
	function ( aHitElement )
		if ( aHitElement ~= localPlayer ) then 
			if ( getElementType ( aHitElement ) == 'player' ) then 
				if ( getElementData ( localPlayer , 'aProperty' ) == 'M4' ) then 
					setElementHealth ( aHitElement , getElementHealth ( aHitElement ) - 2 ) 
				end 
			end 
		end 
	end 
)

بس حط للاعب داتا , والقيمة 'M4'

Link to comment

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...