Jump to content

طلب 3 اكواد


Recommended Posts

Posted

السلام عليكم

لو سمحتم بغيت

كود نسخ الاي بي

كود نسخ السيريال

كود اظهار الفلوس بشات

طبعا لشوب

Posted

إقرأ اللي بـ الرابط

https://wiki.multitheftauto.com/wiki/SetClipboard

// و مثآل تطبيقي

addEventHandler ("onClientGUIClick", root, 
    function() 
        if ( source ==  CopySerial ) then 
             setClipboard(getPlayerSerial()) 
        end 
     end 
) 
  
--[[ 
CopySerial = هو أسم الزر بـ اللوحة 
]] 

Posted
بس باقي كودين ياعوال

انا معطيكـ رآبط ششرح + مثآل تطبيقي ..

على شأن إيش ؟؟؟

Posted

معليش ياعناد بس انا مبتدا

وسويت الكود ذا هو صححيح ولا

  
addEventHandler ("onClientGUIClick", root, 
    function() 
        if ( source ==  CopyIP ) then 
             setClipboard(getPlayerIP()) 
        end 
     end 
) 

هو صحيح ولا؟

Posted

جرب هذا

  
    addEventHandler ("onClientGUIClick", root, 
    function() 
        getMyIP = getPlayerIP( source ) 
        if ( source ==  CopyIP ) then 
          setClipboard ( getMyIP  ) 
        end 
     end 
) 

F4MZM4.gif

Posted
جرب هذا
  
    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

Posted
جرب هذا
  
    addEventHandler ("onClientGUIClick", root, 
    function() 
        getMyIP = getPlayerIP( source ) 
        if ( source ==  CopyIP ) then 
          setClipboard ( getMyIP  ) 
        end 
     end 
) 

هذا الكود مو صحيح

getPlayerIP server only, setClipboard client only.

اخ نسيت معليش

استخدم

triggerClientEvent 

F4MZM4.gif

Posted (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 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

Posted
يب حبيبي

سوي الزر باستخدام

guiCreateButton 

و جيب فلوس الاعب باستخدام

getPlayerMoney 

وطلعه بالشات

outputChatBox 

واستخدم

onClientGUIClick

بعد ما تسوي كل هذا عطني النتيجة

وان كان فيه غلط قول

وانا اعدلك عليه

بالتوفيق

F4MZM4.gif

Posted
يب حبيبي

سوي الزر باستخدام

guiCreateButton 

و جيب فلوس الاعب باستخدام

getPlayerMoney 

وطلعه بالشات

outputChatBox 

واستخدم

onClientGUIClick

بعد ما تسوي كل هذا عطني النتيجة

وان كان فيه غلط قول

وانا اعدلك عليه

بالتوفيق

حبيبي لاهنت

بس انا مابسوي النافذة والازرار بالوامر بسويها بالجوا اديتور,

Posted
كود نسخ السيريال

استخدم /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

كفى ووفى

مشكووور

انت احسن موديراتور للفوريوم

F4MZM4.gif

Posted
كود نسخ السيريال

استخدم /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) 
  

يالغلا انت مافهمتي,

انا بسوي زر بشوب وابيه لما يظغطه يجي فلوسه بشات !

ان شاءالله فهمتني

ودي لك,

Posted (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 by Guest

F4MZM4.gif

Posted
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

Posted

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

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