Doffy Posted December 24, 2016 Share Posted December 24, 2016 ابي اخلي اول ما تضغط علي البوتون يعطيك درع ويسحب منك فلوس 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
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 (edited) --#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 December 24, 2016 by MR.GRAND Link to comment
N3xT Posted December 24, 2016 Share Posted December 24, 2016 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
Jw8. Posted December 24, 2016 Share Posted December 24, 2016 addEventHandler function( ) getPlayerMoney outputChatBox triggerServerEvent end, false ); Link to comment
MR.GRAND Posted December 24, 2016 Share Posted December 24, 2016 13 minutes ago, N3xT said: مافيه بارتمر للاعب بفنكشن جلب الفلوس ( الكلنت سايد ) فقط بالنسبة لــ --#Client side getPlayerMoney( player ) or getPlayerMoney( ) نفس الشيء ^ وماراح يتغير شيء بينهم ^ الإثنين راح يجيبون فلوس اللاعب المحلي . تقدر تجرب ^ Link to comment
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