Mbtdaa Posted July 21, 2012 Posted July 21, 2012 السلام عليكم لو سمحتم بغيت كود نسخ الاي بي كود نسخ السيريال كود اظهار الفلوس بشات طبعا لشوب
3NAD Posted July 21, 2012 Posted July 21, 2012 إقرأ اللي بـ الرابط https://wiki.multitheftauto.com/wiki/SetClipboard // و مثآل تطبيقي addEventHandler ("onClientGUIClick", root, function() if ( source == CopySerial ) then setClipboard(getPlayerSerial()) end end ) --[[ CopySerial = هو أسم الزر بـ اللوحة ]]
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 يعطيك العافيه ياعناد بس باقي كودين ياعوال *_*
3NAD Posted July 21, 2012 Posted July 21, 2012 بس باقي كودين ياعوال انا معطيكـ رآبط ششرح + مثآل تطبيقي .. على شأن إيش ؟؟؟
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 معليش ياعناد بس انا مبتدا وسويت الكود ذا هو صححيح ولا addEventHandler ("onClientGUIClick", root, function() if ( source == CopyIP ) then setClipboard(getPlayerIP()) end end ) هو صحيح ولا؟
Tete omar Posted July 21, 2012 Posted July 21, 2012 جرب هذا addEventHandler ("onClientGUIClick", root, function() getMyIP = getPlayerIP( source ) if ( source == CopyIP ) then setClipboard ( getMyIP ) end end )
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 طيب يعطيكم العافيه بس بغيت كود اظهار الفلوس بشات لاهنتم
Tete omar Posted July 21, 2012 Posted July 21, 2012 طيب يعطيكم العافيه بس بغيت كود اظهار الفلوس بشات لاهنتم تبيه بــ زر ؟
JR10 Posted July 21, 2012 Posted July 21, 2012 جرب هذا addEventHandler ("onClientGUIClick", root, function() getMyIP = getPlayerIP( source ) if ( source == CopyIP ) then setClipboard ( getMyIP ) end end ) هذا الكود مو صحيح getPlayerIP server only, setClipboard client only. Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Tete omar Posted July 21, 2012 Posted July 21, 2012 جرب هذا addEventHandler ("onClientGUIClick", root, function() getMyIP = getPlayerIP( source ) if ( source == CopyIP ) then setClipboard ( getMyIP ) end end ) هذا الكود مو صحيح getPlayerIP server only, setClipboard client only. اخ نسيت معليش استخدم triggerClientEvent
JR10 Posted July 21, 2012 Posted July 21, 2012 (edited) كود نسخ السيريال استخدم /copyserial Client: function copySerialCommand() setClipboard(getPlayerSerial()) end addCommandHandler("copyserial", copySerialCommand) كود نسخ الاى بى استخدم /copyip Server: function copyIPCommand(player) triggerClientEvent(player, "copyIP", player, getPlayerIP(player)) end addCommandHandler("copyip", copyIPCommand) Client: function copyIP(ip) setClipboard(ip) end addEvent("copyIP", true) addEventHandler("copyIP", root, copyIP) كود اظهار الفلوس بالشات استخدم الزر 'm' function outputPlayerMoney(player) outputChatBox(getPlayerName(player).." has $"..getPlayerMoney(player), root, 0, 255, 0) end function bindKeyForAll() for index, player in pairs(getElementsByType("player")) do bindKey(player, "m", "down", outputPlayerMoney) end end addEventHandler("onResourceStart", resourceRoot, bindKeyForAll) function bindKeyForPlayer() bindKey(source, "m", "down", outputPlayerMoney) end addEventHandler("onPlayerJoin", root, bindKeyForPlayer) Edited July 21, 2012 by Guest Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Tete omar Posted July 21, 2012 Posted July 21, 2012 يب حبيبي سوي الزر باستخدام guiCreateButton و جيب فلوس الاعب باستخدام getPlayerMoney وطلعه بالشات outputChatBox واستخدم onClientGUIClick بعد ما تسوي كل هذا عطني النتيجة وان كان فيه غلط قول وانا اعدلك عليه بالتوفيق
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 يب حبيبي سوي الزر باستخدام guiCreateButton و جيب فلوس الاعب باستخدام getPlayerMoney وطلعه بالشات outputChatBox واستخدم onClientGUIClick بعد ما تسوي كل هذا عطني النتيجة وان كان فيه غلط قول وانا اعدلك عليه بالتوفيق حبيبي لاهنت بس انا مابسوي النافذة والازرار بالوامر بسويها بالجوا اديتور,
Tete omar Posted July 21, 2012 Posted July 21, 2012 كود نسخ السيريالاستخدم /copyserial Client: function copySerialCommand() setClipboard(getPlayerSerial()) end addCommandHandler("copyserial", copySerialCommand) كود نسخ الاى بى استخدم /copyip Server: function copyIPCommand(player) triggerClientEvent(player, "copyIP", player, getPlayerIP(player)) end addCommandHandler("copyip", copyIPCommand) Client: function copyIP(ip) setClipboard(ip) end addEvent("copyIP", true) addEventHandler("copyIP", root, copyIP) كود اظهار الفلوس بالشات استخدم الزر 'm' function outputPlayerMoney(player) outputChatBox(getPlayerName(player).." has $"..getPlayerMoney(player), root, 0, 255, 0) end function bindKeyForAll() for index, player in pairs(getElementsByType("player")) do bindKey(player, "m", "down", outputPlayerMoney) end end addEventHandler("onResourceStart", resourceRoot, bindKeyForAll) function bindKeyForPlayer() bindKey(source, "m", "down", outputPlayerMoney) end addEventHandler("onPlayerJoin", root, bindKeyForPlayer) اعتقد انو JR10 كفى ووفى مشكووور انت احسن موديراتور للفوريوم
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 كود نسخ السيريالاستخدم /copyserial Client: function copySerialCommand() setClipboard(getPlayerSerial()) end addCommandHandler("copyserial", copySerialCommand) كود نسخ الاى بى استخدم /copyip Server: function copyIPCommand(player) triggerClientEvent(player, "copyIP", player, getPlayerIP(player)) end addCommandHandler("copyip", copyIPCommand) Client: function copyIP(ip) setClipboard(ip) end addEvent("copyIP", true) addEventHandler("copyIP", root, copyIP) كود اظهار الفلوس بالشات استخدم الزر 'm' function outputPlayerMoney(player) outputChatBox(getPlayerName(player).." has $"..getPlayerMoney(player), root, 0, 255, 0) end function bindKeyForAll() for index, player in pairs(getElementsByType("player")) do bindKey(player, "m", "down", outputPlayerMoney) end end addEventHandler("onResourceStart", resourceRoot, bindKeyForAll) function bindKeyForPlayer() bindKey(source, "m", "down", outputPlayerMoney) end addEventHandler("onPlayerJoin", root, bindKeyForPlayer) يالغلا انت مافهمتي, انا بسوي زر بشوب وابيه لما يظغطه يجي فلوسه بشات ! ان شاءالله فهمتني ودي لك,
JR10 Posted July 21, 2012 Posted July 21, 2012 و انا اعملك الباقى guieditor باستخدام GUI حبيبي اعمل ال Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Tete omar Posted July 21, 2012 Posted July 21, 2012 (edited) client side showMoney = guiCreateButton(564,132,68,28,"send",false,tap1) function scripting() money = getPlayerMoney(localPlayer) if ( source == showMoney ) then triggerServerEvent("onGetPlayerMoney", getRootElement(), money) end end addEventHandler("onClientGUIClick", root, scripting) server side addEvent("onGetPlayerMoney", true) function onGetPlayerMoney (money) local playerName = getPlayerName( source ) outputChatBox(playerName.."has"..money, root, 0, 255, 0) addEventHandler("onGetPlayerMoney", getRootElement(), onGetPlayerMoney) هذا زر مسويه كـ مثال انت غيره على كيفك بس انت فاهم Edited July 21, 2012 by Guest
JR10 Posted July 21, 2012 Posted July 21, 2012 showMoney functionو اسم ال showMoney انت عندك الزر الكود خاطئ Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Mbtdaa Posted July 21, 2012 Author Posted July 21, 2012 client side showMoney = guiCreateButton(564,132,68,28,"send",false,tap1) function showMoney() money = getPlayerMoney(localPlayer) if ( source == showMoney ) then triggerServerEvent("onGetPlayerMoney", getRootElement(), money) end end addEventHandler("onClientGUIClick", root, showMoney) server side addEvent("onGetPlayerMoney", true) function onGetPlayerMoney (money) local playerName = getPlayerName( source ) outputChatBox(playerName.."has"..money, root, 0, 255, 0) addEventHandler("onGetPlayerMoney", getRootElement(), onGetPlayerMoney) هذا زر مسويه كـ مثال انت غيره على كيفك بس انت فاهم حبيبي الكلنت فيه خطء ض1
JR10 Posted July 21, 2012 Posted July 21, 2012 Client: showMoney = guiCreateButton(564,132,68,28,"send",false,tap1) function outputMoney() local money = getPlayerMoney() triggerServerEvent("onGetPlayerMoney", localPlayer, money) end addEventHandler("onClientGUIClick", showMoney, outputMoney, false) Server: function onGetPlayerMoney (money) outputChatBox(getPlayerName(client).." has $"..money, root, 0, 255, 0) end addEvent("onGetPlayerMoney", true) addEventHandler("onGetPlayerMoney", root, onGetPlayerMoney) Business System viewtopic.php?f=108&t=35797 Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726 SQLite Tutorial viewtopic.php?f=148&t=38203
Tete omar Posted July 21, 2012 Posted July 21, 2012 كان عندي سؤال بسيط وش الفرق بين getPlayerMoney(localPlayer) وبين getPlayerMoney()
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