• Content Count

  • Joined

  • Last visited

Community Reputation

11 Decent

About Sisqo0

  • Rank


  • Location

Recent Profile Visitors

428 profile views
  1. Sisqo0

    Best performance

    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")
  2. 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] setElementData(player,"data",{x,y,z}) local data = getElementData(player,"data") local x,y,z = data[1],data[2],data[3] --3rd way >> fromJSON setElementData(player,"data",toJSON(x,y,z)) local data = fromJSON(getElementData(player,"data")) --then i use the 3rd line of either of the last 2 ways Thanks in advance
  3. 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
  4. 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?"
  5. there is nothing wrong here so those can be the reason :- or or maybe this event in server side
  6. 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.
  7. 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 )
  8. by using createObject attachElements with some animation.
  9. الفانكشن دي هتساعدك getOnlineAdmins
  10. 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.
  11. Sisqo0

    Button Team

    Yes i know them. Anyways thanks 😍
  12. 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.
  13. 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) setElementData(team,"level",1) elseif level == 1 then outputChatBox("U bought level 2 for your Team ^^", 0,255,0) setElementData(team,"level",2) removeEventHandler("onClientGUIClick", Button1,OnTeamPlayerClickLVL) end end end -- server side RED = createTeam("Red Team", 255, 0, 0) BLUE = createTeam("Blue Team", 0, 0, 255)
  14. Sisqo0

    Button Team

    which event? do you mean outputChatBox ? to appear for all players in team?
  15. 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.