-
Posts
1,255 -
Joined
-
Last visited
Everything posted by .:HyPeX:.
-
Hey guys, i want to do filewrite at pos 120 in my script, without actually overwriting, so just adding stuff. But i cannot, it just overwrites stuff and fucks it up. This is becouse i want to add custom definitions to my script, and if i add em on the end of it, it will not work. Greetz HyPeX
-
Thaaaaanks!!!
-
I dont belive RaceMode is from mapmanager... still cant find RaceMode anywhere.
-
Hey guys, as far as i see, whenever a map ends, the race gamemode does: gotoState('EveryoneFinished') RaceMode.endMap() eg: function raceTimeout() if stateAllowsTimesUp() then gotoState('TimesUp') for i,player in pairs(g_Players) do if not isPlayerFinished(player) then triggerClientEvent("onServerWantShowCenterMessage",resourceRoot,false,"Time\'s up!") end end clientCall(g_Root, 'raceTimeout') TimerManager.destroyTimersFor("raceend") RaceMode.endMap() end end But i cannot find where the RaceMode.endMap function is defined inside the race, could someone help me?
-
Bump, this is the complete function, what am i doing wrong? local px,py,pz = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) local rx,ry,rz = getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) local now = getTickCount() local start = start local finish = start + 5000 local duration = 5000 local elapsed = now - start local progress = elapsed / duration if elapsed < 1000 then local duration = 1000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local alpha = interpolateBetween(0,0,0,255,0,0, progress, "Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed >1000 and elapsed < 1500 then local duration = 500 local start = start + 1000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz + 75 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local rz2 = rz + 90 local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz2) local cx,cy = interpolateBetween(cx,cy,0,cx2,cy2,0,progress,"Linear") setCameraMatrix(cx,cy,pz+5,px,py,pz) local alpha = interpolateBetween(255,0,0,0,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 1500 and elapsed < 2000 then local duration = 500 local start = start + 1500 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz + 90 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local rz2 = rz + 105 local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz2) local cx,cy = interpolateBetween(cx,cy,0,cx2,cy2,0,progress,"Linear") setCameraMatrix(cx,cy,pz+5,px,py,pz) local alpha = interpolateBetween(0,0,0,255,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 2000 and elapsed < 2500 then local duration = 500 local start = start + 2000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz - 75 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local rz2 = rz - 90 local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz2) local cx,cy = interpolateBetween(cx,cy,0,cx2,cy2,0,progress,"Linear") setCameraMatrix(cx,cy,pz+5,px,py,pz) local alpha = interpolateBetween(255,0,0,0,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 2500 and elapsed < 3000 then local duration = 500 local start = start + 2500 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz - 90 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local rz2 = rz - 105 local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz2) local cx,cy = interpolateBetween(cx,cy,0,cx2,cy2,0,progress,"Linear") setCameraMatrix(cx,cy,pz+5,px,py,pz) local alpha = interpolateBetween(0,0,0,255,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 3000 and elapsed < 3500 then local duration = 500 local start = start + 3000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz + 180 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local alt = interpolateBetween(pz+10,0,0,pz+5,0,0,progress,"Linear") setCameraMatrix(cx,cy,alt,px,py,pz) local alpha = interpolateBetween(255,0,0,0,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 3500 and elapsed < 4000 then local duration = 500 local start = start + 3500 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local rz1 = rz + 180 local cx,cy = getPointFromDistanceRotation (px,py,10,rz1) local alt = interpolateBetween(pz+5,0,0,pz,0,0,progress,"Linear") setCameraMatrix(cx,cy,alt,px,py,pz) local alpha = interpolateBetween(0,0,0,255,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 4000 and elapsed < 4500 then local duration = 500 local start = start + 4000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local cx,cy = getPointFromDistanceRotation (px,py,15,rz) local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz) local alt,cx,cy = interpolateBetween(pz+10,cx,cy,pz+5,cx2,cy2,progress,"Linear") setCameraMatrix(cx,cy,alt,px,py,pz) local alpha = interpolateBetween(255,0,0,0,0,0,progress,"Linear") dxDrawImage(0,0,x,y,myRender,0,0,0, tocolor(255,255,255,alpha),true) elseif elapsed > 4500 and elapsed < 4950 then local duration = 450 local start = start + 4500 local ending = start + duration local elapsed = now - start local progress = elapsed / duration ---- local cx,cy = getPointFromDistanceRotation (px,py,10,rz) local cx2,cy2 = getPointFromDistanceRotation(px,py,7,rz) local alt,cx,cy = interpolateBetween(pz+5,cx,cy,pz+1.5,cx2,cy2,progress,"Linear") setCameraMatrix(cx,cy,alt,px,py,pz) elseif elapsed > 4950 then setCameraTarget(getLocalPlayer()) dxDrawText("GOGOGOGO", x*0.4, y*0.4, x*0.2,y*0.1, tocolor(180,0,0,255), 3, "default-bold") dxDrawRectangle(0,y*0.4,x,y*0.05, tocolor(0,0,0,180)) toggleAllControls(true) end
-
Yes of course, it works, but the rotation taken into account was if like rz never existed (Or was always 0) wich i do not understand is why, i output the RZ before those lines and it is perfect... but it is not considered somehow.
-
Well, it is not taking my vehicle rotation into account, its taking it as if it always rz was 0.. wich is not. local px,py,pz = getElementPosition(getPedOccupiedVehicle(getLocalPlayer())) local rx,ry,rz = getElementRotation(getPedOccupiedVehicle(getLocalPlayer())) local cx,cy = getPointFromDistanceRotation (px,py,10,rz +75) local cx2,cy2 = getPointFromDistanceRotation(px,py,10,rz +90) local cx,cy = interpolateBetween(cx,cy,0,cx2,cy2,0,progress,"Linear") setCameraMatrix(cx,cy,pz+10,px,py,pz)
-
hey guys, how can i calculate a XYZ position by having a rotation and distance? For example, setting up the camera according to the rotation of my car in a place.
-
hey guys, is there any function to check the current nitrous level of a vehicle? greetz.
-
Well there you are doing something wrong if you want "carname[model]" to actually do something since its just a key value/string being search for, not any table position thought.
-
If that was the problem, it would still work, since the text would be at some point (going from -0,2 to +0,2) cutting of the text, and it never does.
-
Then your problem is somewhere else. Perhaps, yes, might have to make some clientside script aswell. Not Really. Your error is as he said somewhere else. Any errors in debug? PD: getting the vehicle name from model will return GTA:SA's one.
-
dxCreateRenderTarget() dxSetRenderTarget() dxUpdateScreenSource() -- Stated up dxCreateScreenSource() -- Stated up There's more stuff involved such as animations thought.
-
So my idea is pretty easy, how can i make the dxText to be cut off by the bounding box? So if i make the bounding box enlarge or stretch it will cut off letters, but so far it just displays the text completly, while the rectangle shows slowly... function RenderCreditStuff() --Check if not startup if not checkpoint then return end --Locals... local now = getTickCount() local duration = 5000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration if elapsed < 1000 then --First Step Anim locals setup local duration = 1000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration --First Step Anims local x1 = interpolateBetween(0, 0,0, x*0.4,0,0, progress, "InQuad") dxDrawRectangle(x*0.2, y*0.4, x1, y*0.1, tocolor(0,0,0,180)) elseif elapsed > 1000 and elapsed < 2000 then --Second Step Anim locals setup local duration = 1000 local start = start + 1000 local ending = start + duration local elapsed = now - start local progress = elapsed / duration --First Step finished Anims dxDrawRectangle(x*0.2, y*0.4, x*0.4, y*0.1, tocolor(0,0,0,180)) --Second Step Anims local x1 = interpolateBetween(0, 0,0, x*0.4,0,0, progress, "InQuad") dxDrawText("Map: Unknown", x*0.2, y*0.4, x1, y*0.1,tocolor(255,255,255,255), 1, DxFont, "left", "top",true,false,true,true,true) dxDrawRectangle(x*0.2, y*0.5, x1, y*0.1, tocolor(0,0,0,180)) else end end addEventHandler('onClientRender', root, RenderCreditStuff)
-
Oh i get it, that wont work, it was stated in another topic some time ago, using direct numbers as a variable in the table will determine a table position, and therefore, not work. Therefore use something like this: outputChatBox("(( This " .. tostring(carname."a"..getVehicleModel(source)[1]) .. " belongs to " .. ownerName .. ". ))", thePlayer, 255, 195, 14) --Remember to edit the table at the start of the script local carname = { } carname.a506 = {"Austin Martin Z12 Zagato MD10"} carname.a560 = {"1993 Subaru Impreza"} Also, you are returning a table in the carname, since the names are inside a table.
-
1C27BAcc6 seems like a userdata name, check its type. Else, we need to know how you get the variables, we cant just make magic
-
Ok, sorry for the long time, i was just bussy. Now, i cant figure it out. It says no such column 'F23A4676' (Serial) local dataSaving = dbQuery(Database, "INSERT INTO "..v[2].." (Serial, Punishes, StartTime, EndTime, Duration, PlayerName, ResponsibleName, Reason) VALUES (?,?,?,?,?,?,?,?)",v[2],v[1],v[3],v[4],v[5],v[6],v[7],v[8]) EDIT: Got it to work, now there's something strange, i cannot get the results back... function LoadUpOnResourceStart ( resource ) local dbqery = dbQuery ( Database, "SELECT name FROM sqlite_master WHERE type='table'" ) local tables = dbPoll ( dbqery, -1 ) outputChatBox ( "#6969C9*AS: Restoring ".. #tables .." records from sqlite.", root, 255, 255, 255, true ) for index, tbl in ipairs ( tables ) do loadUpTable [ tbl.name ] = {} loadUpTable [ tbl.name ][ 1 ] = tbl.name outputChatBox(tbl.name) end for a, v in pairs ( loadUpTable ) do local Query = dbQuery ( Database, "SELECT * FROM "..v[1] ) local result = dbPoll ( Query, -1 ) outputChatBox ( table.size(result) ) for i, v in pairs ( result ) do outputChatBox ( #v ) for col, val in ipairs ( v ) do outputChatBox ( val ) end end end end addEventHandler ( "onResourceStart", resourceRoot, LoadUpOnResourceStart ) Output: *AS: Restoring 1 records from sqlite. F27CCCFAB293B848763C115C76C09442 1 0
-
It does work, if you want i can PM you with my menu setup. (Full working with the texts) It just wont work for doing a 3D thing. (Since its 2D rotation)
-
You got the rotations wrong thought. This gave me a really bad time while working out my horizonal menu... Look at this, it will make a 90° rotation to the right. (The three rotations in the table) {270, x * 0.05 + (x*0.2), y*0.85} Explanation: 270° clockwise rotation. x * 0.25 Right > Left screen position rotation point. y * 0.85 Top > Down screen position rotation point. By the way, use dxDrawText3D instead, this only rotates on a 2D way. PD: This is how it goes for a dxDrawText every 0.2 * X in the screen. (Part of long table) local x,y = guiGetScreenSize() TextNow = { Text1 = {"Achivements", 0.21, 0.8, 0.1,0.1,270, x * 0.05 + (x*0.2 ), y*0.85,255}, Text2 = {"Rankings", 0.41 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.4 ), y*0.85,255}, Text3 = {"Tuning",0.61 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.6 ), y*0.85,255}, Text4 = {"Settings", 0.81 , 0.8, 0.1,0.1,270, x * 0.05 + (x*0.8 ), y*0.85,255}, }, --- Drawing i=1 local a = "Text"..i dxDrawText(Dashboard.Positions.TextNow[a][1] , Dashboard.Positions.TextNow[a][2] * x, Dashboard.Positions.TextNow[a][3] * y, Dashboard.Positions.TextNow[a][4] * x, Dashboard.Positions.TextNow[a][5] * y, tocolor(255,255,255,alpha),3,"clear","left", "top", true, false,true, false, true, Dashboard.Positions.TextNow[a][6], Dashboard.Positions.TextNow[a][7], Dashboard.Positions.TextNow[a][8]) EDIT: Did a small sketch to illustrate how it works:
-
The error has nothing to do with it. Probably he just has a very bad internet or PC.
-
Are you sure you are doing it right? https://wiki.multitheftauto.com/wiki/Md5
-
Check their pings, if there's a high ping spike.. not sure.
