-
Posts
6,097 -
Joined
-
Last visited
-
Days Won
218
Everything posted by IIYAMA
-
Because I am not reading every word of the forum? Not sure what kind of super human you are. If you don't want to check if a script is running, then you get warnings and when you get warnings you get a little bit lagg. and not only that little bit lagg, your server logs will be filled with it and your server will be starting slower while accessing the logs. But I won't say anything more about that, it's your own responsibility. bla bla bla..... Post the function you are trying to access. (and what kind of file it is in)
-
Have you ever changed something to relative manualy? Using math. Do you know what a relative value is? Did you ever had % at school? because it is something simular then that. (except you use it as multiplier to change other values)
-
@LekRoots Because write the code manualy is always better in quality, performance and managing. and it is hard to move dx gui's. @'LinKin What if you try a black static image as background? But you lose the move/scale ability with the cursor.
-
function findRotation(x1,y1,x2,y2) local t = -math.deg(math.atan2(x2-x1,y2-y1)) if t < 0 then t = t + 360 end; return t; end rot = findRotation(x,y, x + 0.5 ,y ) https://wiki.multitheftauto.com/wiki/FindRotation
-
Ever heard of debugging? /debugscript 3 local resource = getResourceFromName ( "cspawn" ) if resource then local state = getResourceState (resource) if state == "running" then call (resource, "otherTestFunction", localPlayer ) else outputDebugString("Resource isn't running but: " .. state) end else outputDebugString("resource doesn't exist, ") end
-
(facepalm). What if a player did: /setsoundistance "5" ! Then it still will be a nil. outputChatBox = outputChatBox or print -- For lua demo utility. outputChatBox(tonumber(tostring('"5"')))
-
@mega, Why are you calling that function multiple times? If you are drawing stuff, overheating your code is the last thing you want.
-
local health = math.ceil(getElementHealth(localPlayer)) if health > 0 then if health <= 5 then dxDrawImage(x*0.785, y*0.200, 30, 35, "health/05.png", 0, 0, 0, tocolor(0, 0, 0, 255), true) elseif health <= 10 then -- etc.
-
Texture failures? viewtopic.php?f=104&t=79103 Screenshot_1 Screenshot_2 yes/no ? If no, then what happens exactly to those objects?
-
Afaik not, it is only toggle, but if you want to be sure you can set setVehicleIdleRespawnDelay again. Mta has it's own respawn check system, I have no idea how that works and I can't take a look in that. Also keep in mind that next to setVehicleIdleRespawnDelay, there is also: https://wiki.multitheftauto.com/wiki/Se ... spawnDelay After the setVehicleIdleRespawnDelay has been expired, then there is also this delay.
-
after the vehicle did explode I disabled respawning the vehicle. (timer starts) toggleVehicleRespawn(source,false) and when the timer ends I enabled it again. toggleVehicleRespawn(vehicle,true)
-
local SecondsDelayForSpawn = 1 -- 1 second addEventHandler("onVehicleExplode", root, function () toggleVehicleRespawn(source,false) setTimer(function (vehicle) if isElement(vehicle) then respawnVehicle(vehicle) toggleVehicleRespawn(vehicle,true) end end,SecondsDelayForSpawn*1000, 1,source) end) addEventHandler ("onResourceStart", resourceRoot, function() local vehicles = getElementsByType ("vehicle") for i=1,#vehicles do local vehicle = vehicles[i] toggleVehicleRespawn(vehicle, true) setVehicleIdleRespawnDelay(vehicle, 120000) end end)
-
Disable respawning while running the timer, keep in control of the methods you are using. Because they are working against each other.
-
ok, that is clear. It was worth to try.
-
Why don't we wait for AbaZaSiRiN00 to reply. All those double posts lead to nothing.
-
tables can replace every variable in your whole code if you want. myScript = { ["variableName"] = "IIYAMA", ["variableWhut"] = 345763645984366, ["thisFunction"]= function () outputChatBox("thisFunction") end, ["thatFunction"]= function () outputChatBox("thatFunction") end } outputChatBox(myScript["variableName"]) outputChatBox(myScript["variableWhut"]) myScript["thisFunction"]() myScript["thatFunction"]() as arezu said you can also use the: . outputChatBox(myScript.variableName) myScript.thisFunction() and this is how you clear them: myScript["thisFunction"] = nil myScript.thisFunction = nil I prefer the ["name"], because in my opinion it is clearer and you will have the benefit that you can put every kind of data between the [ ]. Which can make your code more dynamic. When you use the . you can only access with strings.
-
You have to pay for using their service. https://developers.google.com/translate/ http://www.sitepoint.com/using-google-t ... e-api-php/ $20 per 1 million characters of translation or language
-
Is there a way to check, where Satchels are attached to?
IIYAMA replied to Einheit-101's topic in Scripting
Nope, There is only one way, overwriting with lua. From the creation t/m attachment. -
The markers still don't spawn at the blip, they spawn in a different house than they should. I took your table and changed it in a useful table. If so then you gave me incorrect marker locations. Reinsert the marker locations till those are correct.
-
That is why forums do exist, to do bla, bla, bla.... Looks like you haven't figured that out yet. yes, topic can be locked, looks like he found it on the community.
-
or what about this table construction. If you want to have the markers of other houses, you can also move markers(tables) to other houses. as your example, move per house one marker(table) to another houses. But I leave that to you. local locations = { {--EastLosSantos ["blip"]={ 2351.9699707031, -1169.8599853516, 28.035507202148 }, ["markers"]={-- rob markers for EastLosSantos house { 2341.66602, -1186.37573, 1027.97656, 0, 5 }, { 2348.66870, -1186.74658, 1027.97656, 0, 5 }, { 2322.23877, -1183.75879, 1027.97656, 0, 5 } } }, {--house IdleWood ["blip"]={ 2166.1999511719, -1671.4699707031, 15.073687553406 }, ["markers"]={-- rob markers for IdleWood house { 326.66299, 1116.79797, 1083.88281, 0, 5 }, { 316.13690, 1117.17993, 1083.88281, 0, 5 }, { 309.62006, 1124.17896, 1083.88281, 0, 5 } } }, {--house WilloField ["blip"]={ 2483.3798828125, -1996.1899414063, 13.834323883057 }, ["markers"]={-- rob markers for WilloField house { 2282.04590, -1135.85901, 1050.89844, 1, 11 }, { 2282.36694, -1137.74646, 1050.89844, 1, 11 }, { 2285.44629, -1136.67346, 1050.89844, 1, 11 } } }, {--house Ganton ["blip"]={ 2402.5183105469, -1715.6148681641, 14.1328125 }, ["markers"]={-- rob markers for Ganton house { 248.23495, 301.60382, 999.14844, 0, 1 }, { 243.82597, 301.51428, 999.14844, 0, 1 }, { 248.83932, 305.45200, 999.14844, 0, 1 } } }, {--house CJ ["blip"]={ 2495.330078125, -1690.75, 14.765625 }, ["markers"]={-- rob markers for CJ house { 2491.69287, -1694.92102, 1014.74792, 0, 3 }, { 2500.01343, -1711.35229, 1014.74219, 0, 3 }, { 2494.01831, -1700.84949, 1018.34375, 0, 3 } } } } --------------------------------------------------------------------------------- local location = locations[math.random(#locations)] -- content of location (table) local blipLocation = location["blip"]-- table local blipX, blipY, blipZ = blipLocation[1],blipLocation[2],blipLocation[3] local markerTable = location["markers"] -- marker tables local markerLocation = markerTable[math.random(#markerTable)] -- table local markerX, markerY, markerZ, dim, int = markerLocation[1],markerLocation[2],markerLocation[3],markerLocation[4],markerLocation[5]
-
Make 2 tables. One with the markers and one with the blips.
