Jump to content

villr

Members
  • Posts

    158
  • Joined

  • Last visited

Everything posted by villr

  1. The code is now addEventHandler( "onClientPedWasted",getLocalPlayer()), function( ) guiSetVisible (spawnmenugrid, true ) guiSetVisible(spawnmenumemo,true) showCursor ( true ) showPlayerHudComponent("radar",false) showChat(false) end) Is it right?
  2. Still get that error message in Console
  3. hmm i get a error about getlocalplayer attempt to call global 'getLocalPlayer' It what error said I havent try it yet but why it comes a error?
  4. so i dont will remove getLocalPlayer? It will be on same place? And remove OnClientplayerblablabla adn put in OnClientped blabla?
  5. Hi im making a rpg script right now and when a player die i want the gui to show up again but when a player dies it show for all... Here is code addEventHandler( "onClientPlayerWasted", getLocalPlayer( ), function( ) guiSetVisible (spawnmenugrid, true ) guiSetVisible(spawnmenumemo,true) showCursor ( true ) showPlayerHudComponent("radar",false) showChat(false) end) What is wrong? Why does it show for all??
  6. villr

    Spawning gui

    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
×
×
  • Create New...