Hi
Im having a trobule with my spawning gui and its when a player tex. click police and when you click "trucker" its dosent change text
Here is code
spawnmenu = guiCreateWindow(573,383,220,213,"Spawn Menu",false)
spawnmenugrid = guiCreateGridList(0.1273,0.1174,0.7545,0.6677,true,spawnmenu)
guiGridListSetSelectionMode(spawnmenugrid,2)
guiGridListAddColumn(spawnmenugrid,"Spawn Team",0.9)
spawnmenubutton = guiCreateButton(0.1636,0.7887,0.7136,0.1174,"Spawn",true,spawnmenu)
spawnmenumemo = guiCreateMemo(187,484,362,99,"",false)
guiSetText ( spawnmenumemo, "Pick a team!!" )
guiMemoSetCaretIndex(spawnmenumemo,true)
showCursor ( true )
spawnteams= {{"Mechanics"},{"Taxi"},{"Police"},{"Hippie"},{"Limo Driver"},{"Medic"},{"Maffia"},{"Truckers"}}
for i,v in ipairs (spawnteams) do
local row = guiGridListAddRow (spawnmenugrid)
guiGridListSetItemText (spawnmenugrid, row, 1, v[1], false, true)
guiGridListSetItemText (spawnmenugrid, row, 2, v[2], false, true)
end
function guiClick (button, state, absoluteX, absoluteY)
if (source == spawnmenubutton) then
if not (guiGridListGetSelectedItem (spawnmenugrid) == false) then
local row,col = guiGridListGetSelectedItem (spawnmenugrid)
local spawnteamname = guiGridListGetItemText (spawnmenugrid, row, 1)
outputChatBox ( "." ..spawnteamname )
else
outputChatBox ("First select your location please.", 255, 0, 0, true)
end
end
end
addEventHandler ("onClientGUIClick", getRootElement(), guiClick)
function gridClick ( state, absoluteX, absoluteY)
if not (guiGridListGetSelectedItem (spawnmenugrid) == false) then
local row,col = guiGridListGetSelectedItem (spawnmenugrid)
if ( guiGridListGetSelectedItem (spawnmenugrid) ~= "Hippie" )then
guiSetText ( spawnmenumemo, "baaaaaaarrrrskkkkkkk...")
if ( guiGridListGetSelectedItem (spawnmenugrid) ~= "Police" )then
guiSetText ( spawnmenumemo, "Police will blablalbla")
else
outputChatBox ("...." )
end
end
end
end
addEventHandler ("onClientGUIClick", spawnmenugrid, gridClick)
Its in the line 37-39 that text is
And here is pic of the gui and where the text pop up
http://img294.imageshack.us/img294/5396/namnlsyw.png
I hope you guys know how to help me