Jump to content


  • Content Count

  • Joined

  • Days Won


SpecT last won the day on June 8

SpecT had the most liked content!

Community Reputation

81 Popular


About SpecT

  • Rank
    Forum Helper
  • Birthday 28/01/1998


  • Location

Recent Profile Visitors

1,460 profile views
  1. Hey, Well we could ask you the same question. What's doesn't work? Any errors from /debugscript 3 ? Something I noticed is that in the function it is used the variable called "pElement" which in the function arguments for some reason its "Element". Maybe this is the problem ?
  2. Hey, There is a chance the player to get an error - the client side event is not attached to any function. When the "onPlayerJoin" is triggered the player might still be downloading -> the player still doesn't have the client side loaded -> error. I don't get it why would you want to bind the key in the server side and "onPlayerConnect". It would have had more logic if it was onPlayerLogin (i.e. to check if has enough rights but you didn't mention something like that). Anyways you can easily put the bindKey function in the client script out of any functions and it will
  3. Well you keep telling that everything we post here doesn't work (even tho I tested). So please be more specific - doesn't work OR it's not what you need. Because there is a difference! It would be best to show the code where you tried and tell us what's wrong with it and what you want to achieve. Also you mentioned you got errors in debugscript so it would be good if you show them as well.
  4. Well, you will need to use tables when it comes to more elements (jobs). I don't know maybe something like this ? function duty(thePlayer) local jobsCount = 10 local foundJob = false for i=1, jobsCount do local checkjob = getElementByID(tostring(i)) if type(checkjob) == "marker" then if isElementWithinMarker(thePlayer, checkjob) then outputChatBox("this marker is for job number "..i, thePlayer, 255, 0, 0) foundJob = true break -- if it finds the marker the player is in => stop the loop end end end if not foundJob then outputChatBox("not withi
  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,
  6. Could you show the code on line 28 ?
  7. 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 sp
  8. Hey, Here is an example meta.xml file with "min_mta_version" section: <meta> <info type="gamemode" name="Test" author="Test" /> <min_mta_version server="1.5.4-9.11342" /> </meta>
  9. If you only want to see them and don't need to store them in a table (for later use) then this should do the job: addEventHandler("onResourceStart", resourceRoot, function(res) -- res = the resource that just started local resourceName = getResourceName(res) local commands = getCommandHandlers(res) -- get all commands from the resource outputChatBox("Commands found in "..resourceName..":", root, 255, 255, 255) for _, command in pairs(commands) do outputChatBox(command, root, 255, 255, 255) end end)
  10. The problem is that getElementPosition returns exact coordinates (in this case X coordinate is "-715.83142089844"). And you are comparing it with "-715.8314". To make it work you will have to round the coordinates. You can either use the useful function math.round or do it like this: local theBlip = createBlip(-715.8314, 2328.1269, 44.1525, 41, 2, 255, 0, 0, 255, 0, 1000) function removeBlip(posX, posY, posZ) for _,blip in ipairs(getElementsByType("blip")) do local x,y,z = getElementPosition(blip) if(math.ceil(posX) == math.ceil(x) and math.ceil(posY) == math.ceil(y) and mat
  11. SpecT

    Help | Webhook

    Hey, Dunno but "getResourdiscordName" doesn't look to me like a normal function name.
  12. You will have to create a variable which will be for your alpha. All your images' and texts' alpha value will have to be multiplied by this variable. If the mouse is not in the position set this variable's value to 0.5 (for example) else 1. Something like this: function gui() local alpha = 1 if not isMouseInPosition(...) then alpha = 0.5 end dxDrawImage(..., tocolor(255, 255, 255, 255*alpha), ...) ... end
  13. You're welcome! And don't worry we all have been there.
  14. Hey, You used the getCursorPosition function wrongly. It doesn't take arguments but returns them. You can check examples in the link above. For your case you will need the useful function on the wiki: IsMouseInPosition. You will need to add the function in your script and then replace your "getCursorPosition" with "isMouseInPosition".
  15. Hey, Don't forget that variable names are case sensitive! local Vendedor = createPed( 179, 308.36, -143.3 , 999.602 , 0 ) local Vendedor1 = createPed( 179, 316.48, -133.333, 999.602 , 90 ) And now check the names you used in the damage events. Do you notice something wrong ?
  • Create New...