Jump to content

[مساعدة]


Doffy

Recommended Posts

Posted

ابي اول ما الواحد يدخل في ماركر زر ال ويضغط زر التاب يسحب من فلوس اللاعب 400 الف ويعطيه سرعة واول ما يموت اللاعب السرعة تروح منه

 

speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

function marker(player)
    if getElementType(player) == "player" and player == localPlayer then
    outputChatBox("#0000FF*#FF0000SpeedPerk#0000FF*this will cost you ( #FF0000$400,000#0000FF ) press'tab'", 255,255,255,true)
        end
end
addEventHandler("onClientMarkerHit", speedy, marker)

bindKey("tab","down",marker,
function()
if getElementType(player) == "player" and player == localPlayer then
setGameSpeed(tonumber("8"))
end
end)

 

Posted
Just now, Abu-Solo said:

كيف يعني ؟

يعني شوف ابيه اول ما يدخل الماركر ويضغط زر تاب ياخذ السرعة

Posted (edited)

setElementData

+

getElementData

 

setElementData ---- يحط داتا

getElementData --- يتأكد من الداتا اللي معه

Edited by Abu-Solo
  • Like 1
Posted

اول مايدخل الماركر تحقق ان ضاغط زر التاب عن طريق

getKeyState

وتحقق من فلوسه و اسحب من فلوسه

getPlayerMoney
takePlayerMoney

بعدين سوي ترايقر للكلينت وحط للاعب سبيد

triggerClientEvent
setGameSpeed

لأن لو استخدمت فنكشن السرعة بالسيرفر راح تصير السبيد للكل اما لو ترسل ترايقر للكلينت وتفعل الفنكشن راح تصير للسورس

وعند مايموت الاعب رجع القيم سبيد على طبيعتها 

Posted
5 minutes ago, Abdul KariM said:

اول مايدخل الماركر تحقق ان ضاغط زر التاب عن طريق


getKeyState

وتحقق من فلوسه و اسحب من فلوسه


getPlayerMoney
takePlayerMoney

بعدين سوي ترايقر للكلينت وحط للاعب سبيد


triggerClientEvent
setGameSpeed

لأن لو استخدمت فنكشن السرعة بالسيرفر راح تصير السبيد للكل اما لو ترسل ترايقر للكلينت وتفعل الفنكشن راح تصير للسورس

وعند مايموت الاعب رجع القيم سبيد على طبيعتها 

يخوي لو سويته لي وتشرحه علشان تفهم الله يجزاك خير

Posted (edited)
5 minutes ago, Abdul KariM said:

للاسف ترا من كلامي تقدر تطبق , وابشر بالتصحيح لا اخطيت

اوكي خلك معي انا بسوي الحين

5 minutes ago, Abdul KariM said:

للاسف ترا من كلامي تقدر تطبق , وابشر بالتصحيح لا اخطيت

هذي محاولتي يخوي

كلنت
 

speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

function marker(player)
    if getElementType(player) == "player" and player == localPlayer then
    outputChatBox("#0000FF*#FF0000SpeedPerk#0000FF*this will cost you ( #FF0000$400,000#0000FF ) press'tab'", 255,255,255,true)
	    if getKeyState( "tab" ) == true or getKeyState( "tab" ) == true then
		triggerServerEvent("buyperkspeed",localPlayer)
        end
end
end
addEventHandler("onClientMarkerHit", speedy, marker)


addEvent("speed",true)
addEventHandler("speed",root,
function()
setGameSpeed(tonumber(8))
end)

سيرفر
 

addEvent("buyperkspeed",true)
addEventHandler("buyperkspeed",root,
function()
if getPlayerMoney(source) > 400000 then 
takePlayerMoney(source,400000)
triggerClientEvent("speed",source)
end
end
)

ما اشتغلت

Edited by KinG_Himoo12
Posted

كلينت 

speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

addEventHandler("onClientMarkerHit", speedy ,

	function ( player )

	if ( player == getLocalPlayer (	) ) then
  
	outputChatBox("#0000FF*#FF0000SpeedPerk#0000FF*this will cost you ( #FF0000$400,000#0000FF ) press'tab'", 255,255,255,true)
	 
	if getKeyState( "tab" ) == true then
	
	triggerServerEvent("onBuySpeed", player )
			end
		end
	end
	)
	
addEvent( "onGiveSpeed" , true )

addEventHandler("onGiveSpeed", root ,

	function (	)
	
	setGameSpeed( 8 )

	end
	)	

سيرفر

addEvent( "onBuySpeed" , true )

addEventHandler( "onBuySpeed", root ,

	function (	)
	
	local aPlayerMoney = getPlayerMoney( source )

	if ( aPlayerMoney >= 400000 ) then 
	
	takePlayerMoney( source , 400000 )

	triggerClientEvent( source , "onGiveSpeed", source )
		end
	end
	)	
	

 

  • Like 1
Posted
3 minutes ago, Abdul KariM said:

كلينت 


speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

addEventHandler("onClientMarkerHit", speedy ,

	function ( player )

	if ( player == getLocalPlayer (	) ) then
  
	outputChatBox("#0000FF*#FF0000SpeedPerk#0000FF*this will cost you ( #FF0000$400,000#0000FF ) press'tab'", 255,255,255,true)
	 
	if getKeyState( "tab" ) == true then
	
	triggerServerEvent("onBuySpeed", player )
			end
		end
	end
	)
	
addEvent( "onGiveSpeed" , true )

addEventHandler("onGiveSpeed", root ,

	function (	)
	
	setGameSpeed( 8 )

	end
	)	

سيرفر


addEvent( "onBuySpeed" , true )

addEventHandler( "onBuySpeed", root ,

	function (	)
	
	local aPlayerMoney = getPlayerMoney( source )

	if ( aPlayerMoney >= 400000 ) then 
	
	takePlayerMoney( source , 400000 )

	triggerClientEvent( source , "onGiveSpeed", source )
		end
	end
	)	
	

 

ما اشتغل يخوي

Posted

مستحيل مايشتغل , لاكن جرب الطريقة هذي 

استبدل الكلينت بهذا

speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

	function isPlayerInMarker (	)
	
	if isElementWithinMarker( localPlayer, speedy ) then
	
	triggerServerEvent ( "onBuySpeed" , localPlayer )
	
		end
	end
	bindKey ( "tab" , "down" , isPlayerInMarker )
	
addEvent( "onGiveSpeed" , true )

addEventHandler("onGiveSpeed", root ,

	function (	)
	
	setGameSpeed( 8 )

	end
	)	

 

  • Like 1
Posted
13 minutes ago, KinG_Himoo12 said:

ما اشتغل يخوي

 تأكد من الميتا انك ضايف ملف سيرفر وكليت

  • Like 1
Posted
10 minutes ago, خلف said:

 تأكد من الميتا انك ضايف ملف سيرفر وكليت

متأكد وربي

14 minutes ago, Abdul KariM said:

مستحيل مايشتغل , لاكن جرب الطريقة هذي 

استبدل الكلينت بهذا


speedy = createMarker(3102.84253,-2093.56201,1.16875-1,'cylinder',1,2,12,255,255)

	function isPlayerInMarker (	)
	
	if isElementWithinMarker( localPlayer, speedy ) then
	
	triggerServerEvent ( "onBuySpeed" , localPlayer )
	
		end
	end
	bindKey ( "tab" , "down" , isPlayerInMarker )
	
addEvent( "onGiveSpeed" , true )

addEventHandler("onGiveSpeed", root ,

	function (	)
	
	setGameSpeed( 8 )

	end
	)	

 

طيب اشتغل يخوي ابي اول ما اللاعب يموت تنحذف الخاصية من عنده لحاله ما تنحذف عند الكل

Posted

@Abdul KariM

أجل كيف تبيه يشيل منه الخاصية ؟

نحتاج داتا لما يشتري

عشان لما يموت اللاعب نشوف الداتا ترو او فولس

اذا كانت ترو يخليها فولس ويرجع القيم سبيد

واذا فولس return end 

ولا عندك طريقة ثانيةة ؟

 

Posted

مايحتاج داتا ابدأ

يوم يموت الاعب ترايقر للكلينت رجع القيم سبيد زي ماكان وانتهينا 

مايحتاج المشورة هذي

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