Jump to content

I need help


Hypnos

Recommended Posts

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.

bF3DY69.png

is gridlist not selected, editbox full or nul; on Button click is error.

2.

naNGeWF.png

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 )

Link to comment
  
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?

Link to comment
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.

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