Mbtdaa Posted July 21, 2012 Share Posted July 21, 2012 السلام عليكم لو سمحتم بغيت كود نسخ الاي بي كود نسخ السيريال كود اظهار الفلوس بشات طبعا لشوب Link to comment
3NAD Posted July 21, 2012 Share Posted July 21, 2012 إقرأ اللي بـ الرابط https://wiki.multitheftauto.com/wiki/SetClipboard // و مثآل تطبيقي addEventHandler ("onClientGUIClick", root, function() if ( source == CopySerial ) then setClipboard(getPlayerSerial()) end end ) --[[ CopySerial = هو أسم الزر بـ اللوحة ]] Link to comment
Mbtdaa Posted July 21, 2012 Author Share Posted July 21, 2012 يعطيك العافيه ياعناد بس باقي كودين ياعوال *_* Link to comment
3NAD Posted July 21, 2012 Share Posted July 21, 2012 بس باقي كودين ياعوال انا معطيكـ رآبط ششرح + مثآل تطبيقي .. على شأن إيش ؟؟؟ Link to comment
Mbtdaa Posted July 21, 2012 Author Share Posted July 21, 2012 معليش ياعناد بس انا مبتدا وسويت الكود ذا هو صححيح ولا addEventHandler ("onClientGUIClick", root, function() if ( source == CopyIP ) then setClipboard(getPlayerIP()) end end ) هو صحيح ولا؟ Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 جرب هذا addEventHandler ("onClientGUIClick", root, function() getMyIP = getPlayerIP( source ) if ( source == CopyIP ) then setClipboard ( getMyIP ) end end ) Link to comment
Mbtdaa Posted July 21, 2012 Author Share Posted July 21, 2012 طيب يعطيكم العافيه بس بغيت كود اظهار الفلوس بشات لاهنتم Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 طيب يعطيكم العافيه بس بغيت كود اظهار الفلوس بشات لاهنتم تبيه بــ زر ؟ Link to comment
JR10 Posted July 21, 2012 Share 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. Link to comment
Tete omar Posted July 21, 2012 Share 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 Link to comment
JR10 Posted July 21, 2012 Share 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 Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 يب حبيبي سوي الزر باستخدام guiCreateButton و جيب فلوس الاعب باستخدام getPlayerMoney وطلعه بالشات outputChatBox واستخدم onClientGUIClick بعد ما تسوي كل هذا عطني النتيجة وان كان فيه غلط قول وانا اعدلك عليه بالتوفيق Link to comment
Mbtdaa Posted July 21, 2012 Author Share Posted July 21, 2012 يب حبيبي سوي الزر باستخدام guiCreateButton و جيب فلوس الاعب باستخدام getPlayerMoney وطلعه بالشات outputChatBox واستخدم onClientGUIClick بعد ما تسوي كل هذا عطني النتيجة وان كان فيه غلط قول وانا اعدلك عليه بالتوفيق حبيبي لاهنت بس انا مابسوي النافذة والازرار بالوامر بسويها بالجوا اديتور, Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 عايدي سوي الزر وحطه if source == button then بس Link to comment
Tete omar Posted July 21, 2012 Share 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 كفى ووفى مشكووور انت احسن موديراتور للفوريوم Link to comment
Mbtdaa Posted July 21, 2012 Author Share 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) يالغلا انت مافهمتي, انا بسوي زر بشوب وابيه لما يظغطه يجي فلوسه بشات ! ان شاءالله فهمتني ودي لك, Link to comment
JR10 Posted July 21, 2012 Share Posted July 21, 2012 و انا اعملك الباقى guieditor باستخدام GUI حبيبي اعمل ال Link to comment
Tete omar Posted July 21, 2012 Share 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 Link to comment
JR10 Posted July 21, 2012 Share Posted July 21, 2012 showMoney functionو اسم ال showMoney انت عندك الزر الكود خاطئ Link to comment
Mbtdaa Posted July 21, 2012 Author Share 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 Link to comment
JR10 Posted July 21, 2012 Share 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) Link to comment
Tete omar Posted July 21, 2012 Share Posted July 21, 2012 كان عندي سؤال بسيط وش الفرق بين getPlayerMoney(localPlayer) وبين 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