Jump to content

İ need help!


Hypnos

Recommended Posts

i do Money send panel.

I think there's an error somewhere is trying to corrupt.

I sent the person getting the money but does not.

I'll give the code where the error.

I hope you can help.

Error Image;

c3kTLy7.png

(Client-Side)

addEventHandler("onClientGUIClick", getRootElement(), 
  function () 
    if source == GUIEditor.button[1] then 
       local sel_1 = guiGridListGetSelectedItem(GUIEditor.gridlist[1]) 
       local getMoneyToSend = guiGetText(GUIEditor.edit[1]) 
            if sel_1 ~= -1 and getMoneyToSend ~= -1 then 
            local PlayerName = guiGridListGetItemText(GUIEditor.gridlist[1],sel_1,1) 
            local player = getPlayerFromName(PlayerName) 
                   triggerServerEvent("paraGonder",localPlayer,player,getMoneyToSend) 
            end 
    end 
  end 
 ) 

(Server-Side)

addEvent("paraGonder",true) 
addEventHandler("paraGonder", getRootElement(), 
    function(player,sentMoney) 
    local Gonderen = getPlayerName(source) 
    local Alan = getPlayerFromName(player) 
    local getmoney = tonumber(getPlayerMoney(source)) 
         if tonumber(sentMoney) <= getmoney and tonumber(sentMoney) >= 0 and tonumber(sentMoney) ~= 0 then 
         local give = givePlayerMoney (Alan,tonumber(sentMoney)) 
         local take = takePlayerMoney (source,tonumber(sentMoney)) 
            if give and take then 
                outputChatBox("Para Yolladın, "..player.." [ Miktar: $"..sentMoney.." ]",source,0,255,0,true) 
                outputChatBox(""..Gonderen.."'dan Para Geldi, [ Miktar: $"..sentMoney.." ]",Alan,0,255,0,true) 
            end 
         elseif getmoney <= tonumber(sentMoney) or 0 >= tonumber(sentMoney) then 
             outputChatBox("Yeterli Paran Yok",source,255,0,0,true) 
         end 
    end 
) 

Waiting for your help.

:arrowup:

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