-
Posts
346 -
Joined
-
Last visited
-
Days Won
1
Everything posted by roaddog
-
A: Swiss Chocolate Q: Why is no one here?
-
damn its been years and Hi
-
because there is no handler in Freeroam, start play resource
-
What do you mean by passive and green areas? killer can headshot victim that is inside safe zones?? if so add some check if the victim is inside safe zones then return false it eg: using https://wiki.multitheftauto.com/wiki/IsInsideRadarArea if (isElementInsideRadarArea(victim, area) then return false end
-
you can create table and put coordinates and width or height if they vary -- Store your coordinates and width height here local warehouses = { {x, y, z, width, height}, {x1, y2, z2, width2, height},} local warehouse = {col = {}, radar = {}} for i, v in ipairs(warehouses) do local x, y, z, w, h = unpack(v) warehouse.col[i] = createColRectangle(x, y, z, w, h) warehouse.radar[i] = createRadarArea(x, y, z, w, h, 0, 0, 255, 90) end
-
local criminals = {} function checkCriminals() local cr, cg, cb = getPlayerNametagColor(source) if getPlayerWantedLevel(source) >= 1 and cr, cg, cb ~= 255, 0, 0 then setPlayerNametagColor(source, 255, 0, 0) criminals[source] = createBlipAttachedTo(source,0, 25, 255, 0, 0) else setPlayerNametagColor(source, 0, 255, 0) if criminals[source] and isElement(criminals[source]) then destroyElement(criminals[source]) criminals[source] = nil end end end addEvent("onPlayerWantedLevelChange", true) addEventHandler("onPlayerWantedLevelChange", root, checkCriminals) untested i guess it works..
-
function setClothes() local account = getPlayerAccount(source) if ( not isGuestAccount(account) ) then local textureString = getAccountData(account, "Clothessaver:Texture") local modelString = getAccountData(account, "Clothessaver:Model") iprint(textureString, modelString) -- check debugscript for info if textureString and modelString then -- check if textureString is not false or nil local textures = split (textureString, 44) ---- line 33 local models = split (modelString, 44) ---- line 34 for i=0, 17, 1 do if ( textures[i+1] ~= "," or textures[i+1] ~= nil ) then addPedClothes(source, textures[i+1], models[i+1], i) ---- line 36 end end outputChatBox("Clothes were added by clothessaver", source, 0, 255, 0) textures = {} models = {} end end end addEventHandler("onPlayerLogin", getRootElement(), setClothes) It's either your account data retrieving false or nil value, you should check it before actually split expected string.
-
Well if you have your own system to give player wanted level, you can do it easily put triggerEvent like such. function yourOwnGivePlayerWantedLevel(player, wl) local lastWl = getPlayerWantedLevel(player) if wl then local newWl = wl + lastWl -- Can be minus can be plus setPlayerWantedLevel(player, newWl) triggerEvent("onPlayerWantedLevelChange", player, lastWl, newWl) end end
-
print some value in debug print(your_variable)
-
u put expots in meta of rafalh_shared resource?
-
Would i be able to let real physic adapted to setElementAttachedOffsets? So I move my magnet object with setElementAttachedOffsets and attachElements to it but the thing is, its got thru world object, can I prevent it from happening?
-
This is nice way to organize, gonna implement this and see how it goes
- 21 replies
-
- onclienthudrender
- onclientprerender
-
(and 1 more)
Tagged with:
-
So i want to create markers but they all need to be between some range, example: create marker if distance between each other is 50 using getDistanceBetweenPoints3D function createMissions() local max = max or 60 for i, v in ipairs(clients_marker) do if last_markers[1] and last_markers[2] and last_markers[3] then max = math.floor(getDistanceBetweenPoints3D(v[1] , v[2] , v[3], last_markers[1], last_markers[2], last_markers[3]) ) outputChatBox(max) end if max >= 60 then job_markers[i] = createMarker(v[1] , v[2] , v[3]+0.2, "cylinder", 1, 255, 255, 0, 170 ) if job_markers[i] then setElementData(job_markers[i], "el:jtickets", true) setElementData(job_markers[i], "el:jobtype", jobtype[math.random(1,3)]) job_markers_blip[i] = createBlip(v[1] , v[2] , v[3], 0, 1, 200, 200, 0, 255) last_markers = {v[1] , v[2] , v[3]} end end end outputChatBox(#job_markers) end above is working but not for all markers, just last created marker if you get what i mean, thank you for helping
-
function getColorToImage(arg1, arg2, arg3) if (not arg1) then return false end if (arg2) then if (arg2 == "pink") then return pink end if (arg2 == "blue") then return blue end if (arg2 == "yellow") then return yellow end if (arg2 == "red") then return red end end if (arg1 == "pink") then return pink_1 end if (arg1 == "blue") then return blue_1 end if (arg1 == "yellow") then return yellow_1 end if (arg1 == "red") then return red_1 end if (arg3 == "pink") then return pink_2 end if (arg3 == "blue") then return blue_2 end if (arg3 == "yellow") then return yellow_2 end if (arg3 == "red") then return red_2 end end could you make it simpler?
-
ITS A FRICKING CLIENT SIDED SCRIPT ON RESOURCE, so you cant just make a server out of it.
-
Check out tutorials subforum, there are bunch of tips and tricks you want to know As beginner i'd like you to check out this tuts which created by madex, this one really well explained https://forum.multitheftauto.com/topic/64228-the-ultimate-lua-tutorial/
-
Sorry, i borrow your mom in a bit, and idk where your dad is. Last time he saw my fist now idk.
-
Why u open a cheat engine? Its illegal.
-
Jail release point is not set function dxDrawRemainingJailTime ( mx, my, mz ) You cant do dat, remove the parameter Line 21 jail client: change mx, my, mz to your jail release pos
-
Line 54 jail server, mx, my, mz values are nil Find a trigger of this "SAEGJail:UnjailPlayer" event to resolve