Hypnos Posted September 3, 2014 Posted September 3, 2014 Client addEventHandler("onClientGUIClick", getRootElement(), function () if source == paratransferi_buton1yazi then local sel_1 = guiGridListGetSelectedItem(paratransferi_liste1) local getMoneyToSend = guiGetText(paratransferi_yazmayeri1) if sel_1 and getMoneyToSend then local playerName = guiGridListGetItemData ( paratransferi_liste1, sel_1, 1 ) local player = getPlayerFromName(playerName) if isElement(player) then triggerServerEvent("paraGonder",localPlayer,player,getMoneyToSend) putPlayers() else outputChatBox("Oyuncu Seçmelisin veya Boş Alanları Doldurmalısın",255,0,0) end end end end ) Server addEvent("paraGonder",true) addEventHandler("paraGonder", getRootElement(), function(player,sentMoney) local name = getPlayerName(source) local name1 = getPlayerName(player) local getmoney = tonumber(getPlayerMoney(source)) if tonumber(sentMoney) <= getmoney and tonumber(sentMoney) >= 0 and tonumber(sentMoney) ~= 0 then local give = givePlayerMoney (player,tonumber(sentMoney)) local take = takePlayerMoney (source,tonumber(sentMoney)) if give and take then outputChatBox("#0dff00Para Gönderdin. #ffff00"..name1.." #ff8400[Miktar: $"..sentMoney.."]",source,0,255,255,true) outputChatBox("#ffff00"..name.."'#0dff00dan Para Geldi. #ff8400[Miktar: $"..sentMoney.."]",player,0,255,255,true) end elseif getmoney <= tonumber(sentMoney) or 0 >= tonumber(sentMoney) then outputChatBox("Yeterli Paran Yok",source,255,0,0,true) elseif not tonumber(sentMoney) == 0 then outputChatBox("HATA: Para",source,255,0,0,true) end end ) 1. is gridlist not selected, editbox full or nul; on Button click is error. 2. is gridlist player selected, Write the number of things other than the editbox; on Button click is error. Real line number; 339=7 ( Server ) 1471=8 ( Client )
Anubhav Posted September 3, 2014 Posted September 3, 2014 addEventHandler("onClientGUIClick", getRootElement(), function () if source == paratransferi_buton1yazi then local sel_1 = guiGridListGetSelectedItem(paratransferi_liste1) local getMoneyToSend = guiGetText(paratransferi_yazmayeri1) if sel_1 and getMoneyToSend then local playerName = guiGridListGetItemData ( paratransferi_liste1, sel_1, 1 ) local player = getPlayerFromName(tostring(playerName)) if isElement(player) then triggerServerEvent("paraGonder",localPlayer,player,getMoneyToSend) putPlayers() else outputChatBox("Oyuncu Seçmelisin veya Boş Alanları Doldurmalısın",255,0,0) end end end end ) client Which line is that?
Et-win Posted September 3, 2014 Posted September 3, 2014 Are you sure there is any data set onto the grid list's row? Show the piece of script for that, because there is nothing saved on the row.
Hypnos Posted September 4, 2014 Author Posted September 4, 2014 Are you sure there is any data set onto the grid list's row? Show the piece of script for that, because there is nothing saved on the row. function putPlayers() guiGridListClear(paratransferi_liste1) for _,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(paratransferi_liste1) guiGridListSetItemText ( paratransferi_liste1,row,1,(string.gsub ( getPlayerName(player), "#%x%x%x%x%x%x", "" )), false, false) guiGridListSetItemData ( paratransferi_liste1,row,1, getPlayerName(player)) end end also here, i solved the client warning.Help for server error.
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