-
Content Count
523 -
Joined
-
Last visited
-
Days Won
2
Shux last won the day on November 25 2019
Shux had the most liked content!
Community Reputation
16 DecentAbout Shux
-
Rank
Playa Partner
- Birthday 02/02/1997
Details
-
Gang
Hoes
-
Location
Trinidad & Tobago
-
Occupation
Scripter/Mapper
-
Interests
Lua
Recent Profile Visitors
1,128 profile views
-
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
-
Just tested it, works perfectly for me when I attached a blip to myself via command. Could you show your current code ?
-
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
-
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(
-
Shux changed their profile photo
-
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 )
-
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
-
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
-
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.
-
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
-
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
- 5 replies
-
- san andreas
- gta
- (and 5 more)
-
removePedFromVehicle setElementPosition
-
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
-
PM me with your contact information(preferably Discord) and we can discuss further.
-
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.
-
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)