Jump to content

[مساعدة]


Doffy

Recommended Posts

ابي اخلي اول ما تضغط علي البوتون يعطيك درع ويسحب منك فلوس 500 ممكن تساعدوني في الاكواد ؟

addEventHandler("onClientGUIClick",GUIEditor.button[1],
    function ()
local PlayerMoney = getPlayerMoney(source)
 if ( PlayerMoney >= 5000) then
takePlayerMoney(source, 500)
setPedArmor (source, 100)
end
end)

Link to comment
--#Client side
addEventHandler( 'onClientGUIClick', GUIEditor.button[1],
function(  )
	local plrMoney = getPlayerMoney( localPlayer )
		if ( not plrMoney >= 5000 ) then
		outputChatBox( '* Error : You don\'t have enough money !', 255, 0, 0, true ) return end
	triggerServerEvent( 'onServerSetArmor', localPlayer )
end, false );
--#Server side
addEvent( 'onServerSetArmor', true )
addEventHandler( 'onServerSetArmor', root,
function(  )
	local isTaked = takePlayerMoney( source, 5000 )
		if ( isTaked ) then
		setPedArmor( source, 100 )
	end
end );

 

Edited by MR.GRAND
Link to comment
4 hours ago, MR.GRAND said:

--#Client side
addEventHandler( 'onClientGUIClick', GUIEditor.button[1],
function(  )
	local plrMoney = getPlayerMoney( localPlayer )
		if ( not plrMoney >= 5000 ) then
		outputChatBox( '* Error : You don\'t have enough money !', 255, 0, 0, true ) return end
	triggerServerEvent( 'onServerSetArmor', localPlayer )
end, false );

--#Server side
addEvent( 'onServerSetArmor', true )
addEventHandler( 'onServerSetArmor', root,
function(  )
	local isTaked = takePlayerMoney( source, 5000 )
		if ( isTaked ) then
		setPedArmor( source, 100 )
	end
end );

 

مافيه بارتمر للاعب بفنكشن جلب الفلوس ( الكلنت سايد ) فقط

Link to comment
13 minutes ago, N3xT said:

مافيه بارتمر للاعب بفنكشن جلب الفلوس ( الكلنت سايد ) فقط

بالنسبة لــ
 

--#Client side
getPlayerMoney( player )
or
getPlayerMoney(  )

نفس الشيء ^

وماراح يتغير شيء بينهم ^

الإثنين راح يجيبون فلوس اللاعب المحلي .

تقدر تجرب ^

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