Jump to content

golanu21

Members
  • Posts

    650
  • Joined

  • Last visited

Everything posted by golanu21

  1. i remove it... and don't work ,
  2. clientside --gui GUIEditor = { label = {}, } fereastra = guiCreateWindow(773, 239, 607, 576, "Admin Panel", false) guiWindowSetSizable(fereastra, false) Close = guiCreateButton(415, 475, 183, 92, "Close", false, fereastra) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") pos = guiCreateGridList(9, 357, 239, 210, false, fereastra) poscol = guiGridListAddColumn(pos, "Posibilites", 0.9) kick = guiCreateGridList(10, 145, 238, 211, false, fereastra) guiGridListAddColumn(kick, "Kick Player", 0.9) kickbtn = guiCreateButton(248, 145, 124, 59, "Kick Him", false, fereastra) guiSetProperty(kick, "NormalTextColour", "FFAAAAAA") set = guiCreateButton(250, 427, 134, 59, "set", false, fereastra) guiSetProperty(set, "NormalTextColour", "FFAAAAAA") ban = guiCreateButton(248, 298, 124, 58, "Ban Him", false, fereastra) guiSetProperty(ban, "NormalTextColour", "FFAAAAAA") freeze = guiCreateButton(248, 204, 124, 94, "Freeze Him", false, fereastra) guiSetProperty(freeze, "NormalTextColour", "FFAAAAAA") vehicles = guiCreateGridList(379, 145, 219, 208, false, fereastra) guiGridListAddColumn(vehicles, "Vehicles", 0.9) giveveh = guiCreateButton(426, 356, 144, 55, "Give", false, fereastra) guiSetProperty(giveveh, "NormalTextColour", "FFAAAAAA") GUIEditor.label[1] = guiCreateLabel(9, 21, 36, 15, "Name:", false, fereastra) GUIEditor.label[2] = guiCreateLabel(10, 42, 39, 15, "Health:", false, fereastra) GUIEditor.label[3] = guiCreateLabel(10, 62, 44, 15, "Armour:", false, fereastra) GUIEditor.label[5] = guiCreateLabel(248, 50, 326, 57, "Admin Panel", false, fereastra) guiSetFont(GUIEditor.label[5], "sa-header") guiLabelSetColor(GUIEditor.label[5], 0, 0, 0) numele = guiCreateLabel(46, 21, 120, 15, "", false, fereastra) viata = guiCreateLabel(49, 42, 117, 15, "", false, fereastra) armura = guiCreateLabel(59, 62, 114, 15, "", false, fereastra) guiSetVisible(fereastra, false ) -- Script -- --close button addEventHandler("onClientGUIClick",Close, function () guiSetVisible(fereastra, false ) showCursor(false) end ) --start window bindKey ("0", "down", function() if getElementData( localPlayer, 'Show_GUI') ~= nil then guiSetVisible(fereastra, not guiGetVisible(fereastra)) showCursor(guiGetVisible(fereastra)) end end ) addEvent( 'LogOutSetVisible', true ) addEventHandler( 'LogOutSetVisible', root, function() if guiGetVisible(fereastra) then guiSetVisible( fereastra, false ) showCursor( false ) end end ) serverside --adminsOnly addEventHandler ( "onResourceStart", resourceRoot, function ( ) for i, player in ipairs( getElementsByType( 'player' ) ) do if isObjectInACLGroup( 'user.'..getAccountName( getPlayerAccount( player ) ), aclGetGroup( "Admin" ) ) then setElementData( player, 'Show_GUI', true) else setElementData( player, 'Show_GUI', nil) end end end ) addEventHandler( 'onPlayerJoin', root, function() setElementData( source, 'Show_GUI', nil) end ) addEventHandler( 'onPlayerLogin', root, function( _, acc ) if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Admin" ) ) then setElementData( source, 'Show_GUI', true) else setElementData( source, 'Show_GUI', nil) end end ) addEventHandler( 'onPlayerLogout', root, function( _, acc ) triggerClientEvent( source, 'LogOutSetVisible', root) setElementData( source, 'Show_GUI', nil) end )
  3. i use your code... but BAD ARGUMENT:20: @ aclGetGroup( allowedGroup ) -- SERVER SIDE
  4. for i = 0,65535, 1 do what is this?
  5. work for Everyone , and when i login as admin : outputChatBox("You are not an admin")
  6. server side or clientside ???
  7. local Key = "0" -- this is the key client Side --start window addEvent("GUI", true) function caine () guiSetVisible(fereastra, true) showCursor(true) guiLabelSetColor(GUIEditor.label[5],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end addEventHandler("GUI", root, caine) bindKey("Key","down", caine) server side --adminsOnly addEventHandler( 'onPlayerLogin', root, function( ) if isObjectInACLGroup( 'user.'..getAccountName( acc ), aclGetGroup( "Admin" ) ) then triggerClientEvent(source, "GUI", source) else outputChatBox("You are not an admin") end end ) no errors in debugscript don't work [14:13:07] WARNING: Gamemode\vehicles\server.lua:4: Bad argument @ 'getAccountName' [Expected account at argument 1, got nil] [14:13:07] ERROR: Gamemode\vehicles\server.lua:4: attempt to concatenate a boolean value
  8. i press F5 but nothing, debugscript 3 nothing
  9. nothing, all what i have in server side is for other functions
  10. it's a big script but i can put that GUIEditor = { label = {}, } fereastra = guiCreateWindow(773, 239, 607, 576, "Admin Panel", false) guiWindowSetSizable(fereastra, false) Close = guiCreateButton(415, 475, 183, 92, "Close", false, fereastra) guiSetProperty(Close, "NormalTextColour", "FFAAAAAA") pos = guiCreateGridList(9, 357, 239, 210, false, fereastra) poscol = guiGridListAddColumn(pos, "Posibilites", 0.9) kick = guiCreateGridList(10, 145, 238, 211, false, fereastra) guiGridListAddColumn(kick, "Kick Player", 0.9) kickbtn = guiCreateButton(248, 145, 124, 59, "Kick Him", false, fereastra) guiSetProperty(kick, "NormalTextColour", "FFAAAAAA") set = guiCreateButton(250, 427, 134, 59, "set", false, fereastra) guiSetProperty(set, "NormalTextColour", "FFAAAAAA") ban = guiCreateButton(248, 298, 124, 58, "Ban Him", false, fereastra) guiSetProperty(ban, "NormalTextColour", "FFAAAAAA") freeze = guiCreateButton(248, 204, 124, 94, "Freeze Him", false, fereastra) guiSetProperty(freeze, "NormalTextColour", "FFAAAAAA") vehicles = guiCreateGridList(379, 145, 219, 208, false, fereastra) guiGridListAddColumn(vehicles, "Vehicles", 0.9) giveveh = guiCreateButton(426, 356, 144, 55, "Give", false, fereastra) guiSetProperty(giveveh, "NormalTextColour", "FFAAAAAA") GUIEditor.label[1] = guiCreateLabel(9, 21, 36, 15, "Name:", false, fereastra) GUIEditor.label[2] = guiCreateLabel(10, 42, 39, 15, "Health:", false, fereastra) GUIEditor.label[3] = guiCreateLabel(10, 62, 44, 15, "Armour:", false, fereastra) GUIEditor.label[5] = guiCreateLabel(248, 50, 326, 57, "Admin Panel", false, fereastra) guiSetFont(GUIEditor.label[5], "sa-header") guiLabelSetColor(GUIEditor.label[5], 0, 0, 0) numele = guiCreateLabel(46, 21, 120, 15, "", false, fereastra) viata = guiCreateLabel(49, 42, 117, 15, "", false, fereastra) armura = guiCreateLabel(59, 62, 114, 15, "", false, fereastra) guiSetVisible(fereastra, false ) -- Script -- --close button addEventHandler("onClientGUIClick",Close, function () guiSetVisible(fereastra, false ) showCursor(false) end ) --start window xShowPanelFunction_ = function () guiSetVisible(fereastra,not guiGetVisible(fereastra)); showCursor(guiGetVisible(fereastra)); if ( guiGetVisible(fereastra) == true ) then guiLabelSetColor(GUIEditor.label[5],math.random(0, 255), math.random(0, 255), math.random(0, 255)) end end bindKey(Key,"down",xShowPanelFunction_); addEventHandler("Show",root,xShowPanelFunction_); addEvent("Show",true);
  11. work for Everyone WTF???
  12. [22:29:32] WARNING: Gamemode\vehicles\server.lua:4: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got resource-data] [22:29:32] WARNING: Gamemode\vehicles\server.lua:4: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [22:29:32] ERROR: Gamemode\vehicles\server.lua:5: attempt to concatenate local 'accName' (a boolean value)
  13. [22:23:07] WARNING: Gamemode\vehicles\server.lua:17: Bad argument @ 'getPlayerAccount' [Expected element at argument 1, got resource-data] [22:23:07] WARNING: Gamemode\vehicles\server.lua:17: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [22:23:07] ERROR: Gamemode\vehicles\server.lua:18: attempt to concatenate local 'accName' (a boolean value)
  14. [22:19:35] WARNING: Gamemode\vehicles\server.lua:17: Bad argument @ 'getAccountName' [Expected account at argument 1, got boolean] [22:19:35] ERROR: Gamemode\vehicles\server.lua:17: attempt to concatenate a boolean value
×
×
  • Create New...