Jump to content

orcun99

Members
  • Posts

    197
  • Joined

  • Last visited

Everything posted by orcun99

  1. orcun99

    group panel

    textbox is back but https://prnt.sc/g1d7x8
  2. orcun99

    group panel

    textbox is gone and I press add button anyway still erorr check debugscript 3 https://prnt.sc/g1d261
  3. orcun99

    group panel

    There is full script code: server.lua addCommandHandler("group", function(source) if exports.Qacl:isPlayerInGroup(source, "admin") or exports.Qacl:isPlayerInGroup(source, "subadmin") then triggerClientEvent(source, "createWindow", getRootElement()) triggerClientEvent(source, "fillagrid", getRootElement()) triggerClientEvent(source, "fillcgrid", getRootElement()) triggerClientEvent(source, "fillugrid", getRootElement()) end end ) function addGroup(clientname, group) local client=getAccountPlayer(getAccount(clientname)) if client then local playerToAdd = getPlayerAccount(client) if not exports.Qacl:isPlayerInGroup(playerToAdd, group)then exports.Qacl:addAccountToGroup(playerToAdd,group) exports.Qcommands:sendMessage("You've been added to: " ..group.. "!", 0, 150, 0, client) end end end addEvent("addPlayerToGroup", true) addEventHandler("addPlayerToGroup", resourceRoot, addGroup) function removeGroup(client, group) local playerToRemove = getPlayerAccount(client) if exports.Qacl:isPlayerInGroup(playerToAdd, group) then exports.Qacl:removeAccountFromGroup(playerToRemove,group) exports.Qcommands:sendMessage("You've been removed from: " ..group.. "!", 0, 150, 0, client) end end addEvent("removePlayerFromGroup", true) addEventHandler("removePlayerFromGroup", resourceRoot, removeGroup) client.lua uniongroups = {"unionrecruit", "unionsoldier" } confedgroups = {"confedrecruit", "confedsoldier"} rpgroups = {"ssmember", "nsamember", "aramember", "lsfdmember", "usocmember"} function openWindow() showCursor(true) window = guiCreateWindow(555, 381, 220, 288, "Q:RPG - Group management", false) guiWindowSetSizable(window, false) groupGrid = guiCreateGridList(10, 70, 201, 176, false, window) guiGridListAddColumn(groupGrid, "Groups:", 0.9) addButton = guiCreateButton(10, 254, 95, 25, "Add", false, window) remButton = guiCreateButton(110, 254, 95, 25, "Remove", false, window) closeButton = guiCreateButton(184, 31, 27, 23, "X", false, window) name = guiCreateMemo(0.05, 0.09, 0.75, 0.11, "Enter account name", true, window) end addEvent("createWindow", true) addEventHandler("createWindow", root, openWindow) function fillUnionGrids() for i,v in ipairs(uniongroups) do guiGridListSetItemText(groupGrid, guiGridListAddRow(groupGrid), 1, v, false, false) end end addEvent("fillugrid", true) addEventHandler("fillugrid", root, fillUnionGrids) function fillConfGrids() for i,v in ipairs(confedgroups) do guiGridListSetItemText(groupGrid, guiGridListAddRow(groupGrid), 1, v, false, false) end end addEvent("fillcgrid", true) addEventHandler("fillcgrid", root, fillConfGrids) function fillAdminGrids() for i,v in ipairs(rpgroups) do guiGridListSetItemText(groupGrid, guiGridListAddRow(groupGrid), 1, v, false, false) end end addEvent("fillagrid", true) addEventHandler("fillagrid", root, fillAdminGrids) function close() if (source == closeButton) then guiSetVisible(window, false) showCursor(false) end end addEventHandler("onClientGUIClick", root, close) function addThePlayer(thePlayer) if (source==addButton) then triggerServerEvent("addPlayerToGroup", getRootElement(), guiGetText(name), guiGridListGetSelectedItem(groupGrid)) end end addEventHandler("onClientGUIClick", root, addThePlayer) function removeThePlayer(thePlayer) if (source==remButton) then triggerServerEvent("addPlayerFromGroup", getRootElement(), guiGetText(name), guiGridListGetSelectedItem(groupGrid)) end end addEventHandler("onClientGUIClick", root, removeThePlayer) I'm sure %100 true account name you can check my accname : https://prntscr.com/g1cx96
  4. orcun99

    group panel

    new erorr : @'getaccountplayer' [expected account at argument 1,got boolean]
  5. orcun99

    group panel

    still don't work erorr: https://prntscr.com/g1cnc3
  6. orcun99

    group panel

    still same problem
  7. orcun99

    group panel

    Sorry But I don't understand for example my account name : admin what should I write here? https://prntscr.com/g14y9q
  8. orcun99

    group panel

    function addGroup(client, group) local playerToAdd = getPlayerAccount(client) if not exports.Qacl:isPlayerInGroup(playerToAdd, group)then exports.Qacl:addAccountToGroup(playerToAdd,group) exports.Qcommands:sendMessage("You've been added to: " ..group.. "!", 0, 150, 0, client) end end addEvent("addPlayerToGroup", true) addEventHandler("addPlayerToGroup", resourceRoot, addGroup) function addThePlayer(thePlayer) if (source==addButton) then triggerServerEvent("addPlayerToGroup", getRootElement(), guiGetText(name), guiGridListGetSelectedItem(groupGrid)) end end addEventHandler("onClientGUIClick", root, addThePlayer) what's wrong ? debugscript 3 : bad argument @ 'getplayeraccount'
  9. thank you very much bro works
  10. okay I changed code but still don't work don't like this? addEvent("respawnVehicle",true) function respawnVehicleAdmin(player,sec) if tonumber(sec) then setTimer(function(player) local vehicles = getElementsByType( "vehicle" ) for i, v in ipairs( vehicles ) do local _, occupant = next( getVehicleOccupants( v ) ) if ( not occupant ) then respawnVehicle( v ) end end end,sec * 1000 * 60 * 5 , 1 ,player ) --end end end addCommandHandler("vh",respawnVehicleAdmin) addEventHandler("respawnVehicle",getRootElement(),respawnVehicleAdmin)
  11. I'm using manuel respawn script but I need auto respawn vehicles addEvent("respawnVehicle",true) function respawnVehicleAdmin(player,sec) if tonumber(sec) then setTimer(function(player) local vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do if not getVehicleOccupant(v,0) and not getVehicleOccupant(v,1) and not getVehicleOccupant(v,2) and not getVehicleOccupant(v,3) then respawnVehicle (v) end end end,sec * 1000 , 1 ,player ) --end end end addCommandHandler("vh",respawnVehicleAdmin) addEventHandler("respawnVehicle",getRootElement(),respawnVehicleAdmin) I need every 5min auto respawn empty car I'm using this resource :
  12. addEvent("respawnVehicle",true) function respawnVehicleAdmin(player,sec) if tonumber(sec) then setTimer(function(player) local vehicles = getElementsByType("vehicle") for i,v in ipairs(vehicles) do if not getVehicleOccupant(v,0) and not getVehicleOccupant(v,1) and not getVehicleOccupant(v,2) and not getVehicleOccupant(v,3) then respawnVehicle (v) end end end,sec * 1000 , 1 ,player ) end end addEventHandler("respawnVehicle",getRootElement(),respawnVehicleAdmin) this code is working but I wanna auto respawn in every 5min some one can edit pls?
  13. /code local res = getResourceName ("araclar") if getResourceState(getResourceFromName("araclar")) == "running" then restartResource(res) end /code I wanna restart resource name= araclar but don't work this code
  14. orcun99

    lua problem

    https://prnt.sc/fonl5i https://prnt.sc/fonkyy
  15. orcun99

    lua problem

    still I need help don't work there is gui http://prntscr.com/fogb5l
  16. Thank you but I can't select object so idk modeld radius x y z
  17. pls some one help how I can delete this object have a script?
  18. orcun99

    gate script

    idk scripting can u replace code?
  19. orcun99

    gate script

    gate = createObject( 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58 ) --Object ID (Airport Gate=978) & Co-Ordinates of your gates start of position. gatecol = createColCircle ( 2334.8000488281, 2444.1000976563, 15 ) --Co-Ordinates "X" and "Y" and the radius, I use 15 as default. function openagates(thePlayer) if getElementModel( thePlayer ) == 267 then --Will open only if the player is in the male staff skin moveObject ( gate, 3000, 2334.8000488281, 2444.1000976563, 0 ) --The speed in which 7000 is slow and 2000 is fast to open, Co-Ordinates for the gate to move to. end end addEventHandler( "onColShapeHit", gatecol, openagates ) --Event Handler to trigger the function function closegates (thePlayer) moveObject ( gate, 971, 2334.8000488281, 2444.1000976563, 8.3000001907349, 0, 0, 58) end addEventHandler ( "onMarkerLeave", root, closegates ) closegates is not work help pls
×
×
  • Create New...