Jump to content

Sisqo0

Members
  • Content Count

    78
  • Joined

  • Last visited

Everything posted by Sisqo0

  1. search for it in 'survivorSystem_client.lua' in dayz folder and remove the lines of scoreboard.
  2. Features:- *Creating custom bases as you want for each kind of base. *Stopping/Running it without deleting it. *Warping to any base. *Control all vehicles in the base ( blow & fix & warp it to you & kick it out of base & editing vehicle's inventory ). *Control all tents in the base ( destroy & editing tents' inventory by taking and giving items ). *Spectating mode with 2 cameras to see everything in the base at your position.
  3. This problem is weird for me. it's my first time to face this problem. i started my local server without editing mtaserver.conf and i saw that ase is set to '1' but i can't see the server in local list. when i press info button ,i get the server info and can enter the server by pressing 'connect' (mtasa://127.0.0.1:22003). i want my 2nd PC to log in server but it's not shown and can't join with my IP of 1st PC .. all my ports is closed but it's not the reason because all ports of my 2nd PC are closed too and the server can be seen to both them in local list.
  4. Third :- if there is a function which was attached to event and you call it a lot in the same and other side (client or server) ,would it be better if we just call the function in the same side by its name or using this :- triggerEvent("function-name")
  5. First :- I wanna know, what is the best way to save table in element data ? i know 2 ways only but if there are more and better than those, i hope you tell me --1st way >> table {} setElementData(player,"data",{x,y,z}) --2nd way >> toJSON setElementData(player,"data",toJSON(x,y,z)) Second :- What's the best way to extract variables from table. I know 3 ways but i don't know which one is the best --1st way >> unpack() setElementData(player,"data",{x,y,z}) local data = getElementData(player,"data") local x,y,z = unpack(data) --2nd way >> data[i] se
  6. you should post the part of code which causes that or how can someone help you ? if you don't wanna post the code and need help, send pm to any mod here
  7. i got from debugscript 3 :- dbPoll failed, near "WHERE":syntax error local grp_db = dbConnect("sqlite",":Chats/Groups/groups.db") dbQuery(getinfo,grp_db,"SELECT name FROM groups WHERE groupName = ? AND WHERE rank = ?","Sisqo","Owner") function getinfo(q) if (q) then local p = dbPoll(q,-1) if (#p > 0) then for _,d in pairs(p) do outputChatBox(tostring(d["name"])) end end end end if i removed the second "WHERE" and "AND" , it would work so the question is "How to put 'WHERE' twice?"
  8. there is nothing wrong here so those can be the reason :- or or maybe this event in server side
  9. I'm trying to put vehicles (have ColSphere) in the same location with different dimensions and Interiors but I got a problem that I can hit all the colshapes with onClientColShapeHit although I'm in another dimension and interior. I tried to check the dimension with getElementDimension and parameter of onClientColShapeHit function ( matchingDimension ) but neither of them could help. Is there a way to solve that? Thanks in advance.
  10. you can try this local swic = guiCreateStaticImage( 980, 190, 35, 35, "files/switch_button.png", false ) ----------------------------------Clicking the button function openpanel()----------------------------------------Opening the Next Panel by clicking the button dxDrawRectangle((screenW - 666) / 2, (screenH - 450) / 2, 666, 450, tocolor(0, 0, 0, 203), false)----------------------------------I want the panel to open end addEventHandler ( "onClientGUIClick", swic, openpanel, false )
  11. by using createObject attachElements with some animation.
  12. الفانكشن دي هتساعدك getOnlineAdmins
  13. Maybe you set the element data "vehicle" when someone enter the vehicle only and remove it when he gets out of it so the " data = nil " and keep in mind that if you reconnected, the data would be removed auto unless you saved it.
  14. Sisqo0

    Button Team

    Yes i know them. Anyways thanks
  15. Sisqo0

    Button Team

    no, it will remove event for the player who clicked only but if any player of that team pressed on button.. nothing would happen as someone before pressed on it. Btw you don't need to remove it from all players if it doesn't affect what you want to do but if you still want to remove it, then i have no idea but even if there's a way, i don't think it can be done by client only ( maybe you need to use server side). good luck.
  16. Sisqo0

    Button Team

    here is a way. maybe it's not perfect but addEventHandler & removeEventHandler work for the client only so you need to find another way to reach your goal and here is one. --client side local Button1 = guiCreateButton(--There are no valid arguments ) addEventHandler("onClientGUIClick", Button1, OnTeamPlayerClickLVL) function OnTeamPlayerClickLVL() local team = getPlayerTeam(getLocalPlayer()) local level = (getElementData(team,"level") or 0) for i, v in pairs(getPlayersInTeam(team)) do if level == 0 then outputChatBox("U bought level 1 for your TEAM ^^", 0, 255, 0)
  17. Sisqo0

    Button Team

    which event? do you mean outputChatBox ? to appear for all players in team?
  18. Sisqo0

    Button Team

    it's client side so the function will work for the player who clicked only.. i don't even think that getElementsByType('player') would work but you can try.
  19. Sisqo0

    Download Script

    -- in login panel resource -- put in meta.xml <download_priority_group>1</download_priority_group> -- client function checkTransfer() if isTransferBoxActive() then setTimer(checkTransfer,2000,1) else triggerServerEvent("spawnplayer", resourceRoot,localPlayer,0,0,0) end end addEventHandler("onClientResourceStart",resourceRoot,checkTransfer) --Server function spawnplayer(player,x,y,z) spawnPlayer(player,x,y,z) end addEvent( "spawnplayer", true ) addEventHandler( "spawnplayer", resourceRoot, spawnplayer ) i think this can help you.
  20. i see that you are trying to receive information from client by triggerClientEvent and you did it too in server. triggerServerEvent or triggerClientEvent are used to pass information or give an order not to receive. i will fix your code but you should learn from it not just copy and paste. -- server side marker = createMarker(0, 0, 1.5, "cylinder", 2, 255, 0, 0) setElementData(marker, "Item", 5) addEvent("GetItem", true) addEventHandler("GetItem", root, function() local ItemOfClientMarker = getElementData(marker, "Item") triggerClientEvent("DrawText", resourceRoot, marker, t
  21. you need to define the element that you want to get the data from
  22. -- those functions are shared so you can set and get data from server or client to other setElementData getElementData -- about trigger server from client and client from server -- i see that the example in wiki is very easy and enough to teach anyone triggerServerEvent triggerClientEvent
  23. بصوره و لما اللاعب يضغط عليه تحفظ الداتا بانه عمل ليك زي كدا مثلا button تقدر مثلا تعمل زرار ads = { ad1 = {}, ad2 = {} } --لما لاعب يضغط لايك علي الاعلان الاول تعمل كدا table.insert(ads.ad1, player) --وعلشان تعرف كل الناس اللي عملت لايك علي اعلان رقم واحد for i,v in ipairs(ads.ad1) do outputChatBox(i.."- "..v) end ايضا database ده مثال بسيط ليك و تقدر تعمل احسن منه طبعا و ممكن تستخدم فيه
  24. That's why you don't get the player since you're using timer. Your code has some mistakes too such as you are trying to trigger client side from server by triggerServerEvent and the right is triggerClientEvent. infinity timer can cause some problems as well especially you made it every 3 sec. You can use this better "onElementDataChange" and about the element in marker, you can do this function elementinmarker(element) setTimer(function() if element then if isElementWithinMarker(element,cylinder) then -- Your code end end end,30
  25. Did you define the sound in meta.xml ? & how many numbers of the sounds did you define? It would be better if you did /debugscript 3 ingame and show us
×
×
  • Create New...