Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 15/06/21 in all areas

  1. You can also use this selector if you want all columns from a specific table: jobs_sys.* But it could override some of the table values, if the names are the same from the 2+ tables.
    1 point
  2. Perfect, you are a genius. Thank you so much
    1 point
  3. The alignment of the tables have to be defined. Try this: SELECT jobs_sys.uid, jobs_sys.x, jobs_sys.y, jobs_sys.z, jobs.money FROM jobs_sys LEFT JOIN jobs ON jobs_sys.uid = jobs.uid
    1 point
  4. Do a left (table) join. https://www.w3schools.com/sql/sql_join_left.asp This is the default way data get aligned and merged from different tables.
    1 point
  5. You don't need to use loop since you already got the elements (markers) by ID. So you just check if the player is within them. function duty(thePlayer) local checkjob = getElementByID("1") local checkjob2 = getElementByID("2") if type(checkjob) == "marker" and type(checkjob) == "marker" then -- just to be sure they are markers if isElementWithinMarker(thePlayer, checkjob) then outputChatBox("1 job", thePlayer, 255, 0, 0) elseif isElementWithinMarker(thePlayer, checkjob2) then outputChatBox("2 job", thePlayer, 255, 0, 0) else outputChatBox("not marker", thePlayer, 255, 0, 0) end end end addCommandHandler("duty", duty)
    1 point
  6. I don't think you need the "..." since you will have only 2 arguments. You will need the "..." in case you are sending a message (i.e. PMs). Also why would you send the error message to all the players in the server ? Isn't it supposed to be only for the player who used the command ? I don't get exactly what your idea is tho but this might be useful to you: function paymoney(player,cmd, arg1, arg2) if not arg1 and not arg2 then outputChatBox ("Wrong command syntax. Example: /pay 1 1",player,255,255,255,false) return end if not arg2 then outputChatBox ("No ammount specified. Example: /pay 1 1",player,255,255,255,false) return end -- your stuff here end addCommandHandler("pay",paymoney)
    1 point
  7. You don't need the onMarkerHit event. Use isElementWithinMarker to check in the freezeObject function if the player is inside the marker. Like this: function freezeObject(thePlayer) if isElementWithinMarker(thePlayer, playerMarker) then local currentFreezeStatus = isElementFrozen ( testdoor ) if currentFreezeStatus then setElementFrozen ( testdoor, not currentFreezeStatus ) outputChatBox("You have opened the door!",255,255,255) else setElementFrozen ( testdoor, not currentFreezeStatus ) outputChatBox("You have closed the door!",255,255,255) end end end BTW when you paste code here please use the Code button (next to Quote) in the text editor to be easier to read it here.
    1 point
×
×
  • Create New...