-
Posts
208 -
Joined
-
Last visited
Everything posted by Newbie
-
Line: guiSetVisible ( GUIEditor.label[i] , not guiGetVisible ( GUIEditor.label[i] ) ) Bad Argument @ guiSetVisible, at argument 1 got nil. 182 Line So my code looks like this: GUIEditor = { button = {}, window = {}, staticimage = {}, label = {} } addEventHandler("onClientResourceStart", resourceRoot, function () //MY LABELS Bla Bla end ) for i = 1,20 do guiSetVisible ( GUIEditor.label[i] ,false ) end bindKey('F7','down', function ( ) for i = 1,20 do guiSetVisible ( GUIEditor.label[i] , not guiGetVisible ( GUIEditor.label[i] ) ) end end )
-
Hey. I Gotta problem. bindKey('F7','down', function ( ) for i = 1,20 do guiSetVisible ( GUIEditor.label[i] , not guiGetVisible ( GUIEditor.label[i] ) ) end end ) When i join my server the labels are showing and when i press F7 they hides blabla.. It need to be reversed: When i join server they are hided when press key they shows up.
-
I have made a panel GUI with: button = {} window = {} staticimage = {} label = {} How can i make them stay on the screen at same point of all resolutions ?
-
Thanks. How to make that on all resoliutoins panel be at the canter ?
-
How can i make bind key to show/dontshow (F7) for: addEventHandler("onClientRender", root, function() dxDrawRectangle(204, 234, 507, 300, tocolor(0, 0, 0, 155), true) dxDrawRectangle(204, 205, 507, 29, tocolor(248, 6, 6, 143), true) dxDrawText("USER PANEL", 203, 204, 711, 234, tocolor(255, 255, 255, 255), 1.00, "default", "center", "center", false, false, true, false, false) end )
-
Thanks. Works now. P.S i have changed from outputChatBox to outputConsole bec caused a lot of spam in chat box
-
Your code is same as Solid wrote. I tryed but still not works. PS you didn't added )
-
Doesn't even output.. Looks like the onPlayerPickUpRacePickUp is not working -.-
-
I dont. I did it. Why it doesn't work..
-
addEvent ( "onPlayerPickUpRacePickUp", true Didnt helped
-
Got it wokring by other way, but thanks anyway ^^
-
function someoneReachedHunter(number, sort, model) for index, account in ipairs ( getAccounts ( ) ) do if getAccountPlayer ( account ) then if sort == "vehiclechange" and model == 425 then outputChatBox (" hunter! Run!", getRootElement(), 255, 255, 255, true ) setAccountData( account,"Hunters",tostring( getAccountData( account,"Hunters" ) or 0 )+1 ) end end end end addEvent("onPlayerPickUpRacePickup",true) addEventHandler("onPlayerPickUpRacePickup",getRootElement(),someoneReachedHunter) When i take hunter in race maps it spams and set account data many times bcs of pickups refresh. How to make that every player can take hunter only once in map and if takes more times it wont counts.
-
"Account" exists look: addEventHandler( "onPlayerLogin",root, function ( ) local account = getPlayerAccount( source ) if account then if isGuestAccount( account ) then return end local rWins = getAccountData( account,"Wins" ) or 0 local rDeaths = getAccountData( account,"Deaths" ) or 0 local rTime = getAccountData( account,"Time" ) or 0 setElementData( source,"Wins",tostring( rWins ) ) setElementData( source,"Deaths",tostring( rDeaths ) ) setElementData( source,"Time",tostring( rTime ) ) end end I think i failed here: function UpdateMinuteS ( ) for index, player in ipairs ( getElementsByType "account" ) do setAccountData( account,"Time",tostring( getAccountData( account,"Time" ) or 0 )+1 ) end end setTimer ( UpdateMinuteS, 60000, 0 )
-
[2014-03-16 11:52:10] WARNING: oshEE\panel_server.lua:86: Bad argument @ 'setAccountData' [Expected account at argument 1, got nil] function UpdateMinuteS ( ) for index, player in ipairs ( getElementsByType "account" ) do setAccountData( account,"Time",tostring( getAccountData( account,"Time" ) or 0 )+1 ) end end setTimer ( UpdateMinuteS, 60000, 0 ) From top: local rWins = getAccountData( account,"Wins" ) or 0 local rDeaths = getAccountData( account,"Deaths" ) or 0 local rTime = getAccountData( account,"Time" ) or 0 setElementData( source,"Wins",tostring( rWins ) ) setElementData( source,"Deaths",tostring( rDeaths ) ) setElementData( source,"Time",tostring( rTime ) )
-
I have fixed it. I was missed some functions in other top files. Thanks for help Solid!