Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Shux last won the day on November 25 2019

Shux had the most liked content!

Community Reputation

16 Decent


About Shux

  • Rank
    Playa Partner
  • Birthday 02/02/1997


  • Gang
  • Location
    Trinidad & Tobago
  • Occupation
  • Interests

Recent Profile Visitors

1,271 profile views
  1. Ah , a client sided blip, that explains why my code didn't work for you. Nice to hear you got it working though. topic can be locked now then
  2. Just tested it, works perfectly for me when I attached a blip to myself via command. Could you show your current code ?
  3. Shux

    Help me !!!

    Correct me if I'm wrong but I'm assuming all you're wanting here is that when the player hits the hunter then he gets the hunter bonus ? If this is the case then the only issue with your code is that in your getHunter function, you need to change addWinnerBonus to addHunterBonus
  4. Your getBlipAttachedTo function only returns the first blip that it finds attached to the player. (Also I wouldn't loop through every blip in the server as this can have an impact on performance depending on how many blips there are) What I would advise is looping through the attached elements of the player , adding all the blips to a table then returning the table(instead of only returning the first found attached blip). Then in your onPlayerQuit event, you loop through that table destroying everything. Pretty much the code I have below, hope this helps you! addEventHandler(
  5. Shux

    Sistema Headshot

    The code provided by HiroShi isn't going to work. Cancelling onPlayerDamage has no effect. Also looping is unnecessary in that case. Try this: addEventHandler("onClientPlayerDamage",root, function(attacker,w,body) if attacker then if body ~= 9 then cancelEvent() end end end )
  6. local sx_, sy_ = 1920, 1080 local sx__, sy__ = guiGetScreenSize() local xm, ym = sx__/sx_, sy__/sy_ local hudElements = {} function _dxDrawImage(x,y,w,h,image,rot,rotOffsetX,rotOffsetY,color,postgui) local btn = guiCreateButton(x,y,w,h,"",false) if btn then setElementData(btn,"hudElement",true) guiSetAlpha(btn,0) table.insert(hudElements,{element=btn,type='image',dx={}}) hudElements[#hudElements].dx[1] = x hudElements[#hudElements].dx[2] = y hudElements[#hudElements].dx[3] = w hudElements[#hudElements].dx[4] = h
  7. To start off, something wrong with your code that you should be careful of doing, for instance: Error: -- Replacing this: local sx__, sy__ = guiGetScreenSize() -- keep this -- With this: sx__, sy__ = xs, ys -- = no no To avoid positioning/scaling issues, I wouldn't recommend replacing the value of the variable which you're gonna be using for further calculations with the position of the cursor. Now what you could do is use the onClientClick with a variable to enable/disable the dragging, using onClientRender and getCursorPosition when the cursor is showing , then using the
  8. You could start off with xXMADEXx's tutorial for the basics. Then you can move forward to learning from the mtasa wiki page as well as the lua reference manual. (https://www.lua.org/manual/5.4/) . Hopefully this helps, good luck.
  9. You put 'elseif' as in if the job wasn't the 'RS Haul Delivery' then it would check if the hours played is below 50, which is why you were able to get the job regardless of how many hours played. Here you go though. local hoursplayed = tonumber(getElementData(localPlayer, "hoursplayed")) or 0 if (jobtext=="RS Haul Delivery") then if hoursplayed < 50 then outputChatBox("You must play at least 50 hours to work as a RS haul delivery driver", 255, 0,0) return true end end
  10. Once you've set the element data on the server you can use getElementData on the client to receive the set data. Or triggerClientEvent , whatever you decide
  11. removePedFromVehicle setElementPosition
  12. Shux

    Text on markers

    I believe this is what you're trying to do. marker = createMarker(-662.33703613281,2365.9025878906,178.9553527832, "cylinder", 1.5, 0, 100, 100, 200) function Texto() local x,y,z = getElementPosition(localPlayer) local distance = getDistanceBetweenPoints3D(-662.33703613281,2365.9025878906,178.9553527832,x,y,z) if distance < 20 then local sx,sy = getScreenFromWorldPosition(-662.33703613281,2365.9025878906,178.9553527832) if sx and sy then local coords = {sx,sy} if coords[1] and coords[2] then dxDrawText("CJ", coord
  13. PM me with your contact information(preferably Discord) and we can discuss further.
  14. When the map is starting you loop through all the players(or you can just use onClientMapStarting and check the localPlayer) , then check if the player is in the garage before killing.
  15. You're setting the target's amount of money to the player's (who's using the command) money + amount. You should set the target's money to the money that he has + amount. Therefore.. Add: local penz2 = getElementData(name,"char:money") or 0 And change: setElementData(name,"char:money",atg+penz) To setElementData(name,"char:money",atg+penz2)
  • Create New...