SAM!! Posted July 28, 2017 Share Posted July 28, 2017 elseif ( source == GUIEditor.button[14] ) then setWorldSpecialPropertyEnabled ( "extrajump", true ) ابي بس لما يعطني القفزة يسحب مني مبلغ .. Link to comment
1337.Ibrahim Posted July 28, 2017 Share Posted July 28, 2017 triggerServerEvent takePlayerMoney Link to comment
' A F . Posted July 28, 2017 Share Posted July 28, 2017 'onClientGUIClick' triggerServerEvent getPlayerMoney takePlayerMoney triggerClientEvent setWorldSpecialPropertyEnabled إستخدم الوظائف . ^ . واذا واجهتك أخطاء اطرحها ومانقصر معاك إن شاء الله . Link to comment
Adham Posted July 28, 2017 Share Posted July 28, 2017 (edited) مع اني فاضي, سويت لك الكود. addEventHandler ( "onClientGUIClick", button, function ( ) triggerServerEvent ( "Give", localPlayer ) end, false ) addEvent ( "Accept", true ) addEventHandler ( "Accept", root, function ( ) setWorldSpecialPropertyEnabled ( "extrajump", true ) end ) ; -- Server local Money = 500 -- بدل رقم المال حقك addEvent ( "Give", true ) addEventHandler ( "Give", root, function ( ) if ( getPlayerMoney ( source ) >= tonumber ( Money ) ) then takePlayerMoney ( source, money ) triggerClientEvent ( source, "Accept", source ) else outputChatBox ( "you don't have money!", source, 255 , 0, 0, true ) end end ) ; Edited July 28, 2017 by Deativated Link to comment
Abdul KariM Posted July 28, 2017 Share Posted July 28, 2017 @Deativated يعني ماتشوف في ناس فوق طارحه وظائف وتجي ع البارد المستريح تحط كود جاهز ؟ يعني انت كذا محترف ولا خبير ولا ايش ثانيا تعريف الي بسطر 14 غير الي بسطر 20 2 Link to comment
Adham Posted July 28, 2017 Share Posted July 28, 2017 انا فاضي, فا سويت له الكود م اشوف اي حاجه غلط في الموضوع ومين قال اني محترف معرف ابرمج اصلا Link to comment
#BrosS Posted July 28, 2017 Share Posted July 28, 2017 تقدر تسوي كل شي بالكلينت لماذا الترايقرات المترقرة Link to comment
iMr.WiFi..! Posted July 28, 2017 Share Posted July 28, 2017 23 minutes ago, #BrosS said: تقدر تسوي كل شي بالكلينت لماذا الترايقرات المترقرة لأجل المال ي صديقي ! Link to comment
#BrosS Posted July 28, 2017 Share Posted July 28, 2017 1 hour ago, iMr.WiFi..! said: لأجل المال ي صديقي ! getPlayerMoney , takePlayerMoney يشتغلو بالكلينت Link to comment
Rockyz Posted July 28, 2017 Share Posted July 28, 2017 5 minutes ago, #BrosS said: getPlayerMoney , takePlayerMoney يشتغلو بالكلينت Note: Using this function client side (not recommended) will not change a players money server side. Note: The amount may vary between the server and client, you shouldn't trust the client side value to always be accurate. Link to comment
#BrosS Posted July 28, 2017 Share Posted July 28, 2017 3 minutes ago, #,+( _xiRoc[K]; > said: Note: Using this function client side (not recommended) will not change a players money server side. Note: The amount may vary between the server and client, you shouldn't trust the client side value to always be accurate. يخي **** البرمجة والويكي ذا ويقولك ماننصحك تستعملها بالكلينت shared ليه حاططينها !!!!!!!!!!!!!!!!!!!!!!!!! Link to comment
Adham Posted July 28, 2017 Share Posted July 28, 2017 1 hour ago, #BrosS said: يخي **** البرمجة والويكي ذا ويقولك ماننصحك تستعملها بالكلينت shared ليه حاططينها !!!!!!!!!!!!!!!!!!!!!!!!! اعتقد وهمي بالكلنت ؟ Link to comment
A7M8D Posted July 28, 2017 Share Posted July 28, 2017 addEventHandler ( "onClientGUIClick", button, function ( ) -- بدا اسم الزر triggerServerEvent ( "Give", localPlayer ) end ) addEvent ( "Accept", true ) addEventHandler ( "Accept", root, function ( ) setWorldSpecialPropertyEnabled ( "extrajump", true ) end ) -- Server addEvent ( "Give", true ) addEventHandler ( "Give", root, function ( ) if ( getPlayerMoney ( source ) >= 500 ) then -- فلوسك takePlayerMoney ( source, 500 ) triggerClientEvent ( source, "Accept", source ) else outputChatBox ( "you don't have money!", source, 255 , 0, 0, true ) end end ) تعديل بسيط عشان الكود فوق كان فيه خطا Link to comment
#Soking Posted July 29, 2017 Share Posted July 29, 2017 12 hours ago, #MR.NaiF said: addEventHandler ( "onClientGUIClick", button, function ( ) -- بدا اسم الزر triggerServerEvent ( "Give", localPlayer ) end ) addEvent ( "Accept", true ) addEventHandler ( "Accept", root, function ( ) setWorldSpecialPropertyEnabled ( "extrajump", true ) end ) -- Server addEvent ( "Give", true ) addEventHandler ( "Give", root, function ( ) if ( getPlayerMoney ( source ) >= 500 ) then -- فلوسك takePlayerMoney ( source, 500 ) triggerClientEvent ( source, "Accept", source ) else outputChatBox ( "you don't have money!", source, 255 , 0, 0, true ) end end ) تعديل بسيط عشان الكود فوق كان فيه خطا addEventHandler ( "onClientGUIClick", button, function ( ) -- بدا اسم الزر triggerServerEvent ( "Give", localPlayer ) end ) الكود دا راح يتنفذ على اي شي مو شرط زر Link to comment
Faraon, Posted July 29, 2017 Share Posted July 29, 2017 (edited) takePlayerMoney getPlayerMoney Edited July 29, 2017 by #_MR.DEAD Link to comment
' A F . Posted July 31, 2017 Share Posted July 31, 2017 --- # client addEventHandler ( "onClientGUIClick" , resourceRoot , function () if ( source == yourbutton ) then triggerServerEvent ( "checkMoney" , localPlayer ) ; end end ) ; addEvent("setAction",true) addEventHandler("setAction",root,function() setWorldSpecialPropertyEnabled ( "extrajump" , true ) ; end ) ---- # server addEvent ( "checkMoney" , true ) addEventHandler ( "checkMoney" , root, function ( ) if ( getPlayerMoney ( source ) >= 5000 ) then triggerClientEvent ( source , "setAction" , source ) ; takePlayerMoney ( source , 5000 ) end end ) ; لو فيه خطا شف الدي بق واطرحه هنا 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