Jump to content

طلب تصحيح كود


Recommended Posts

السلام عليكم ورحمة الله ابي تصحيح كود

الكود شراء ملف سيرفر

function dog2() 
    if ( source == Button2 ) then 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 50000) then 
    takePlayerMoney(source,50000) 
        else 
            outputChatBox ( "* لاتمتلك المبلغ المطلوب !", 255, 0, 0, true ) 
        end 
    end 
end 
addEventHandler( "onClientGUIClick", root, dog2 ) 

Link to comment
السلام عليكم ورحمة الله ابي تصحيح كود

الكود شراء ملف سيرفر

function dog2() 
    if ( source == Button2 ) then 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 50000) then 
    takePlayerMoney(source,50000) 
        else 
            outputChatBox ( "* لاتمتلك المبلغ المطلوب !", 255, 0, 0, true ) 
        end 
    end 
end 
addEventHandler( "onClientGUIClick", root, dog2 ) 

جرب

  
-- client side 
  
  
addEventHandler ("onClientGUIClick", getRootElement(), 
function(button, state, absoluteX, absoluteY)  
    if ( source == Button2 ) then 
triggerServerEvent("takeM",getLocalPlayer()) 
    end 
end 
) 

 

 

  
-- server side 
  
addEvent("takeM",true)  
addEventHandler("takeM",root,  
function() 
local PlayerMoney = getPlayerMoney(source) 
 if ( PlayerMoney >= 50000) then 
    takePlayerMoney(source,50000) 
    else 
  outputChatBox("* لاتمتلك المبلغ المطلوب !", source, 255, 0, 0, true) 
end  
end  
)  

Link to comment

السلام عليكم

server side#

addEvent("NssoR",true) 
addEventHandler("NssoR",root, 
function () 
        if (getPlayerMoney(source) >= 50000) then 
            takePlayerMoney(source,50000) 
        else 
            outputChatBox ( "* لاتمتلك المبلغ المطلوب !", 255, 0, 0, source, true) 
      end 
 end 
) 

client #

addEventHandler("onClientGUIClick",root, 
function () 
if ( source == GUIEditor_Button[2] ) then 
    triggerServerEvent("NssoR", localPlayer) 
    guiSetVisible(GUIEditor_Window[1],true) 
    showCursor(true) 
    end 
end) 

:wink:

Edited by Guest
Link to comment
السلام عليكم

server side#

addEvent("NssoR",true) 
addEventHandler("NssoR",root, 
function () 
        if (getPlayerMoney(source) >= 50000 ) then 
            takePlayerMoney(source,50000) 
        else 
            outputChatBox ( "* لاتمتلك المبلغ المطلوب !", 255, 0, 0, true ) 
      end 
 end 
) 

client #

W

addEventHandler("onClientGUIClick",root, 
function () 
if ( source == GUIEditor_Button[2] ) then 
    triggerServerEvent("NssoR", localPlayer) 
    guiSetVisible(GUIEditor_Window[1],true) 
    showCursor(true) 
    end 
end) 

server side#

addEvent("NssoR",true) 
addEventHandler("NssoR",root, 
function () 
        if (getPlayerMoney(source) >= 15000 ) then 
            takePlayerMoney(source,50000) 
        else 
            outputChatBox ( "* لاتمتلك المبلغ المطلوب !", 255, 0, 0, source, true ) 
      end 
 end 
) 

Edited by Guest
Link to comment

X-SHADOW Come and Blow every Body !

addEventHandler( 
'onClientGUIClick', root, 
function () 
    if ( source == Button2 ) then 
    triggerServerEvent('TakeMoney', localPlayer) 
end 
  
end 
) 

addEvent('TakeMoney',true) 
addEventHandler('TakeMoney', root, 
function () 
    if(getPlayerMoney(source) >=50000 )then 
    takePlayerMoney(source, 50000 ) 
    else 
    outputChatBox("*Message Here !", source, 255, 0, 0, true) 
end 
end 
) 

Link to comment

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