Jump to content

dewu

Members
  • Posts

    171
  • Joined

  • Last visited

Everything posted by dewu

  1. dewu

    PlaySound3D

    Okay, i do it Thank you so much, Dealman.
  2. dewu

    PlaySound3D

    I have already complete script contains dropping I just need attach 3D sound to object, that's it.
  3. dewu

    PlaySound3D

    I trying to add flying plane sound to aidropping plane (object). This is moving plane object: function sbros() drop = createObject(1683, xpvq,ypvq,zpvq, 0, 0, 0) moveObject(drop, 15000, xpsq,ypsq,zpsq) end and i want to add them 3D sound, hearable to every players on distance 200 meters. I don't want any command, my script is auto dropping every 2 hours.
  4. dewu

    PlaySound3D

    Like that? addEventHandler("onResourceStart",resourceRoot, function() triggerClientEvent(resourceRoot,"airdropSound",resourceRoot) end) Still not working.
  5. dewu

    PlaySound3D

    Still it's not working. Also you forgot end to close for. There must be some way to do that.
  6. dewu

    PlaySound3D

    ERROR: Loading script failed: drop\avia.lua:596: unexpected symbol near 'for'
  7. dewu

    PlaySound3D

    Hi guys. Im trying to add 3D sound to plane airdrop. Server side: drop = createObject(2903, xpvq,ypvq,zpvq, 0, 0, 0) triggerClientEvent("airdropSound",root) Client side: addEvent("airdropSound", true) addEventHandler("airdropSound", root function ( ) getit = getElementPosition( drop ) local sound = playSound3D("drop.mp3", getit) setSoundMaxDistance(sound, 200) end ) and it's not working, no errors. What i'm doing wrong?
  8. Yeah, i'm fix it. I use guiGridListGetItemText instead of guiGridListGetItemData! By the way, is way to refresh list after add/remove object?
  9. But i can't trigger ACL object, i think ;c At least, i'm trying do that second day.. When i try do that by Client: triggerServerEvent("remove_g", getLocalPlayer(), guiGridListGetItemData(dgrid, guiGridListGetSelectedItem ( dgrid ), 1),splayer) Server: aclGroupRemoveObject (aclGetGroup(allowedGroup), "user."..splayer) i got nil value: [2015-02-04 15:38:45] ERROR: gpa\server.lua:53: attempt to concatenate local 'splayer' (a nil value) splayer - is selected ACL object on list dgrid - is a grid where objects were listed
  10. So, how to get on server-side, selected ACL object on client-side? Does anybody know? ;/
  11. Aww.. okay. splayer is a part of client-side script: GUIEditor = { gridlist = {}, button = {}, label = {}, window = {}, } gpp = guiCreateWindow(126, 100, 802, 346, "Panel właściciela bazy", false) guiSetVisible(gpp,false) guiWindowSetSizable(gpp, false) guiSetAlpha(gpp, 1.00) pgrid = guiCreateGridList(34, 51, 225, 232, false, gpp) pc = guiGridListAddColumn(pgrid, "Gracze online :", 0.9) GUIEditor.label[1] = guiCreateLabel(42, 25, 121, 19, "1 - Wybierz gracza :", false, gpp) dgrid = guiCreateGridList(526, 51, 221, 232, false, gpp) dc = guiGridListAddColumn(dgrid, "Lokatorzy :", 0.9) GUIEditor.label[1] = guiCreateLabel(530, 25, 121, 19, "1 - Wybierz lokatora :", false, gpp) ggrid = guiCreateGridList(280, 51, 223, 232, false, gpp) gc = guiGridListAddColumn(ggrid, "Twoje bazy :", 0.9) GUIEditor.label[2] = guiCreateLabel(286, 25, 121, 19, "2 - Wybierz bazę :", false, gpp) add = guiCreateButton(45, 293, 202, 39, "Dodaj ", false, gpp) guiSetProperty(add, "NormalTextColour", "FF00FF00") remove = guiCreateButton(536, 293, 202, 39, "Wyrzuć ", false, gpp) guiSetProperty(remove, "NormalTextColour", "FFFF0000") x = guiCreateButton(770, 23, 20, 18, "X", false, gpp) addEvent("show_gpp",true) addEventHandler("show_gpp",root, function () guiSetVisible(gpp,true) showCursor(true) clear() triggerServerEvent ("getGroups", getLocalPlayer()) triggerServerEvent ("getLocators", getLocalPlayer()) addPlayers() end ) function clear() guiGridListClear (ggrid) guiGridListClear (pgrid) guiGridListClear (dgrid) end addEvent("refreshg",true) addEventHandler("refreshg",root, function () clear() end ) addEvent("addGroups",true) addEventHandler("addGroups",root, function (v) guiGridListSetItemText ( ggrid, guiGridListAddRow ( ggrid ), gc,v, false, false ) end ) addEvent("addLocators",true) addEventHandler("addLocators",root, function (v) guiGridListSetItemText ( dgrid, guiGridListAddRow ( dgrid ), dc,v, false, false ) end ) function addPlayers() for i,player in ipairs(getElementsByType("player")) do local row = guiGridListAddRow(pgrid) guiGridListSetItemText ( pgrid, row, pc, (string.gsub(getPlayerName(player),'#%x%x%x%x%x%x','') or getPlayerName(player)), false, false) guiGridListSetItemData ( pgrid, row, pc, getPlayerName(player)) end end addEventHandler ( "onClientGUIClick",pgrid, function () splayer = guiGridListGetItemText ( pgrid, guiGridListGetSelectedItem ( pgrid ), 1 ) sgroup = guiGridListGetItemText ( ggrid, guiGridListGetSelectedItem ( ggrid ), 1 ) guiSetText(add,"Dodaj "..splayer.." do "..sgroup.."") guiSetText(remove,"Wyrzuć ") end ) addEventHandler ( "onClientGUIClick",ggrid, function () splayer = guiGridListGetItemText ( pgrid, guiGridListGetSelectedItem ( pgrid ), 1 ) sgroup = guiGridListGetItemText ( ggrid, guiGridListGetSelectedItem ( ggrid ), 1 ) guiSetText(add,"Dodaj "..splayer.." do "..sgroup.."") guiSetText(remove,"Wyrzuć ") end) addEventHandler ( "onClientGUIClick",dgrid, function () slocator = guiGridListGetItemText ( dgrid, guiGridListGetSelectedItem ( dgrid ), 1 ) sgroup = guiGridListGetItemText ( ggrid, guiGridListGetSelectedItem ( ggrid ), 1 ) guiSetText(add,"Dodaj ") guiSetText(remove,"Wyrzuć "..slocator.." z "..sgroup.."") end) function onGuiClick (button, state, absoluteX, absoluteY) if (source == add) then if splayer and sgroup then triggerServerEvent("add_g", getLocalPlayer(), guiGridListGetItemData(pgrid, guiGridListGetSelectedItem ( pgrid ), 1),sgroup) end elseif (source == remove) then if slocator and sgroup then triggerServerEvent("remove_g", getLocalPlayer(), guiGridListGetItemData(dgrid, guiGridListGetSelectedItem ( dgrid ), 1),sgroup) end elseif (source == x) then guiSetVisible(gpp,false) showCursor(false) end end addEventHandler ("onClientGUIClick", getRootElement(), onGuiClick) mean splayer is selected object on list. splayer = guiGridListGetItemText ( pgrid, guiGridListGetSelectedItem ( pgrid ), 1 )
  12. AbaZaSiRiN00, I use your code to listing ACL objects. Now i want to have option to remove them from these list.
  13. I already tried but, but it's not working. addEvent("remove_g",true) addEventHandler("remove_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then aclGroupRemoveObject (aclGetGroup(sgroup), "user."..getAccountPlayer ( splayer )) outputChatBox("* "..splayer.." succesfully removed..",source,0,255,0) outputChatBox("* You have been removed by "..getPlayerName(source).."",getPlayerFromName(splayer),0,255,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end)
  14. One more question, please! I'd like to have option with removing listed objects. There is script to remove player from chosen group: -- remove player from chosen group addEvent("remove_g",true) addEventHandler("remove_g",root, function (splayer,sgroup) if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)),aclGetGroup(allowedGroup)) then if not isGuestAccount(getPlayerAccount(getPlayerFromName(tostring(splayer)))) then aclGroupRemoveObject (aclGetGroup(sgroup), "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) outputChatBox("* "..splayer.." successfully removed from "..sgroup.."",source,0,255,0) outputChatBox("* You've been removed from "..sgroup.."",getPlayerFromName(splayer),255,0,0) else outputChatBox("* You can't remove "..splayer.." from "..sgroup.." because he is not logged in",source,255,0,0) end else outputChatBox("* You don't have rights to do this.",source,255,0,0) outputDebugString("* "..getPlayerName(source).." had attempted to hack the server",2) end end ) "user."..getAccountName(getPlayerAccount(getPlayerFromName(splayer)))) but the question is: how to get object from chosen group and remove it?
  15. Yay! It's working! Thank you very much
  16. So fast! but [2015-02-03 20:14:49] ERROR: gpp\server.lua:21: bad argument #2 to 'insert' (number expected, got string) Line 21: table.insert(objects,string.gsub(object, "user.",""))
  17. Ow, it's working, thanks! Anothers, i'm trying to create ACL object listing: addEvent("getGroups",true) addEventHandler("getGroups",root, function () objects = {} for i,object in ipairs(aclGroupListObjects(aclGetGroup(allowedGroup))) do -- get all groups table.insert(objects,getAccountName(object)) end for i,v in ipairs(objects) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end ) but i've got these error: [2015-02-03 20:05:56] WARNING: gpp\server.lua:22: Bad argument @ 'getAccountName' [Expected account at argument 1, got string 'user.143'] [2015-02-03 20:05:56] WARNING: gpp\server.lua:22: Bad argument @ 'getAccountName' [Expected account at argument 1, got string 'user.155'] [2015-02-03 20:05:56] WARNING: gpp\server.lua:22: Bad argument @ 'getAccountName' [Expected account at argument 1, got string 'user.150'] [2015-02-03 20:05:56] WARNING: gpp\server.lua:22: Bad argument @ 'getAccountName' [Expected account at argument 1, got string 'user.dewu']
  18. Hi guys. I find this script: viewtopic.php?f=108&t=52663 and i want when type /gpp, view only one group (VIP) on right listed. How to do that? This get all ACL Groups: -- get groups addEvent("getGroups",true) addEventHandler("getGroups",root, function () groups = {} for i,group in ipairs(aclGroupList()) do -- get all groups table.insert(groups,aclGroupGetName(group)) end for i,v in ipairs(groups) do -- get all groups in table triggerClientEvent(source,"addGroups",source,v) end end ) but i want only ONE.
  19. dewu

    ACL access

    Guys, i need your help again. I've got two scripts: function test1 (playerSource, commandName, accountName) if isObjectInACLGroup ("user.dewu", aclGetGroup ( "Group1" ) ) then if accountName then aclGroupAddObject (aclGetGroup("Group1"), "user."..accountName) outputChatBox ("Account '"..accountName.."' succesfully added to the group.", playerSource) else outputChatBox ("No account name specified.", playerSource) end end end addCommandHandler ("add", test1) and function test2 (playerSource, commandName, accountName) if isObjectInACLGroup ("user.master", aclGetGroup ( "Group2" ) ) then if accountName then aclGroupAddObject (aclGetGroup("Group2"), "user."..accountName) outputChatBox ("Account '"..accountName.."' succesfully added to the group.", playerSource) else outputChatBox ("No account name specified.", playerSource) end end end addCommandHandler ("add", test2) When I try to add some user to Group1 logged as dewu then it'll add some user to both groups (Group1 and Group2). I want to set dewu permission to add only to Group1, and for master set permission to add only to Group2. How to do that? ;/ I've tried everything. Or maybe is other, simplier way to got that?
  20. Update 0.1.83 Poprawki: • Poprawione zabezpieczenia dla baz • Poprawiony respawn pojazdów z 0.1.69 • Zbalansowane obrażenia oraz częstotliwość respawnu zombie Gamemod: • Dodane dodatkowe zabezpieczenie przeciw kopiowaniu itemów • Dodana możliwość przejeżdżania zombie • Dodany Tactical Vest (kamizelka kuloodporna) • Dodana nowa tekstura dla: Barracks • Dodany FirstPerson Mode (widok z pierwszej osoby) • Dodany Flashbang (granat błyskowy) • Dodane komendy właściciela bazy Admin: • Dodana komenda respawnu pojazdów Forum: • Dodana darmowa forma dotacji • Nowy hosting www Inne: • Dodany 32 slotowy serwer TeamSpeak3
  21. dewu

    FirstPerson Mode

    Yeah, i thinked about it, also i try to do it but it not works ;/
  22. dewu

    FirstPerson Mode

    Still hope is any way to fix that
×
×
  • Create New...