Wei Posted May 25, 2012 Posted May 25, 2012 -- Fixed delete Diet with russian vodka, lose 3 days in one week !
Kenix Posted May 25, 2012 Posted May 25, 2012 Problem is when I don't eaven select thePlayer but it outputs anyway.Client: elseif ( source == theMessageButton ) then local playerName = guiGridListGetItemText ( PlayerGridList, guiGridListGetSelectedItem ( PlayerGridList ), 1 ) local player = getPlayerFromName(playerName) local theMessage = guiGetText( theMessageEdit ) local msg = table.concat({theMessage}, " ") triggerServerEvent("onMessagePlayer", localPlayer, player, msg ) Server: addEvent("onMessagePlayer", true ) function sendMessageToPlayer( daPlayer, msg ) outputChatBox(""..msg.."", source) outputChatBox(""..msg.." not", daPlayer) end addEventHandler("onMessagePlayer", getRootElement(), sendMessageToPlayer ) local nRow, nColumn = guiGridListGetSelectedItem( PlayerGridList ) if nRow ~= - 1 and nColumn ~= - 1 then -- Just create this condition. local playerName = guiGridListGetItemText ( PlayerGridList, nRow, 1 ) -- TODO end http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
Alpha Posted May 25, 2012 Posted May 25, 2012 Try: elseif ( source == theMessageButton ) then local row = guiGridListGetSelectedItem ( PlayerGridList ) if not row or row == -1 then return end local playerName = guiGridListGetItemText ( PlayerGridList,row, 1 ) local player = getPlayerFromName(playerName) local theMessage = guiGetText( theMessageEdit ) local msg = table.concat({theMessage}, " ") triggerServerEvent("onMessagePlayer", localPlayer, player, msg ) My Resources: [REL] Support System v1.0.2
Wei Posted May 25, 2012 Author Posted May 25, 2012 Fixed but thanks Diet with russian vodka, lose 3 days in one week !
Alpha Posted May 25, 2012 Posted May 25, 2012 You're welcome. My Resources: [REL] Support System v1.0.2
Kenix Posted May 25, 2012 Posted May 25, 2012 You're welcome. http://vk.com/the_kenix Вопросы задавайте на форуме, не пишите мне в личку. Please don't pm me.
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