-
Posts
1,255 -
Joined
-
Last visited
Everything posted by .:HyPeX:.
-
Yeah, the stream thingy worked, now, i cant destroy them with destroyElement.. and they keep piling up until i reconnect.. any idea? tried to disable the streaming, but nothing. function IniciarAnimacion() if not on then on = true veh1 = createVehicle(411, 1155.6629638672,-1850.1459960938,13.182800292969,0,0,270) setElementStreamable(veh1, false) veh2 = createVehicle(411, 1147.5030517578,-1853.4709472656,13.182800292969,0,0,270) setElementStreamable(veh2, false) veh3 = createVehicle(411, 1135.5479736328,-1850.8959960938,13.182800292969,0,0,270) setElementStreamable(veh3, false) ped2 = createPed(1,1083.2900390625,-1843.2590332031,13.546899795532,0) ped1 = createPed(2,1081.1309814453,-1843.4270019531,13.546899795532,0) ped3 = createPed(301,1078.9940185547,-1843.4270019531,13.546899795532,0) warpPedIntoVehicle(ped1, veh1,0) warpPedIntoVehicle(ped2, veh2,0) warpPedIntoVehicle(ped3, veh3,0) setPedControlState(ped1, "accelerate", true) setPedControlState(ped2, "accelerate", true) setPedControlState(ped3, "accelerate", true) fadeCamera(false, 1) local ver = setTimer(function() fadeCamera(true, 1) addEventHandler("onClientPreRender", getRootElement(), AnimacionCamara) ver = nil end, 1500, 1) outputChatBox("Gan ON", getRootElement(), 255,255,255,true) else on = nil setElementStreamable(veh1, true) setElementStreamable(veh2, true) setElementStreamable(veh3, true) destroyElement(veh1) destroyElement(veh2) destroyElement(veh3) outputChatBox("Gan OFF", getRootElement(), 255,255,255,true) removeEventHandler("onClientPreRender", getRootElement(), AnimacionCamara) end
-
They're laggy when used in big quantities, from personal experience, they work alot better in terms of performance in client side. How can i stream them?
-
I created client-sided vehicles before with no problem, i need to have them client-sided, and want to know why this is happening..
-
About the 10 thousand reducing maybe he referred to when the PC Loads 10 thousands objects, wich Lags quite a bit, this is a normal bug when selecting a plasticGate with the mapping tool "AMT" wich automatically displays about 7-9k objects. (this freezes mta a bit, and even crashes it if you dont have a decent pc)
-
Hey guys, just got this really weird thing, when i turn it on, the vehicles are in a totally different place... in fact, when i setCameraTarget to the vehicle and i get the target and outputit i get rot 0,0,0 ... No idea what the hell is going on here, script here: local Lugar1 = "Winner" local Lugar2 = "Second" local Lugar3 = "Third" function AnimacionCamara() local LX = 1223.8726806641 local X = 1293.3072509766 local LZ = -8.9970026016235 local Z = 37.882595062256 local LY = -1806.4504394531 local Y = -1861.0502929688 setCameraMatrix(X,Y,Z) local x,y,z = getElementPosition(veh1) setCameraTarget( x, y, z) end function AnimacionAuto() veh1 = createVehicle(411, 1155.6629638672,-1850.1459960938,13.182800292969,0,0,270) veh2 = createVehicle(411, 1147.5030517578,-1853.4709472656,13.182800292969,0,0,270) veh3 = createVehicle(411, 1135.5479736328,-1850.8959960938,13.182800292969,0,0,270) ped2 = createPed(1,1083.2900390625,-1843.2590332031,13.546899795532,0) ped1 = createPed(2,1081.1309814453,-1843.4270019531,13.546899795532,0) ped3 = createPed(301,1078.9940185547,-1843.4270019531,13.546899795532,0) warpPedIntoVehicle(ped1, veh1,0) warpPedIntoVehicle(ped2, veh2,0) warpPedIntoVehicle(ped3, veh3,0) setPedControlState(ped1, "accelerate", true) setPedControlState(ped2, "accelerate", true) setPedControlState(ped3, "accelerate", true) end function PararAnimacionAuto() end function IniciarAnimacion() LX = 1223.8726806641 X = 1293.3072509766 LZ = -8.9970026016235 Z = 37.882595062256 LY = -1806.4504394531 Y = -1861.0502929688 if not on then on = true AnimacionAuto() fadeCamera(false, 1) local ver = setTimer(function() fadeCamera(true, 1) addEventHandler("onClientPreRender", getRootElement(), AnimacionCamara) ver = nil end, 1500, 1) outputChatBox("Gan ON", getRootElement(), 255,255,255,true) else on = nil PararAnimacionAuto() outputChatBox("Gan OFF", getRootElement(), 255,255,255,true) removeEventHandler("onClientPreRender", getRootElement(), AnimacionCamara) end end addCommandHandler("gan", IniciarAnimacion, false)
-
i dont really care about that, i just wanted to have it on clipboard for script with onCameraMatrix faster Anyways,found out myself that was the problem, still thanks for the help.
-
Thanks! this should work pretty much. EDIT: Somehow im getting this: function GetCameraPos(thePlayer,cmd) local X, Y, Z, LX, LY, LZ = getCameraMatrix () outputConsole("X: "..X) outputConsole("Y: "..Y) outputConsole("Z: "..Z) outputConsole("LX: "..LX) outputConsole("LY: "..LY) outputConsole("LZ: "..LZ) local tableCreate = {} tableCreate.X = "X: "..X tableCreate.Y = "Y: "..Y tableCreate.Z = "Z: "..Z tableCreate.LX = "LX: "..LX tableCreate.LY = "LY: "..LY tableCreate.LZ = "LZ: "..LZ local text = splitArrayIntoLines( tableCreate ) setClipboard(text) end addCommandHandler("camera", GetCameraPos, false,false) function splitArrayIntoLines( array ) if ( type( array ) ~= "table" ) then return "" end local splitted = "" for i,v in pairs( array ) do splitted = splitted .. "\r\n" .. i .. ": " .. v end return splitted end Output: LX: LX: 2483 X: X: 2483 LZ: LZ: 21 Z: Z: 21 LY: LY: -1566 Y: Y: -1666
-
Hello guys, i want to set to clipboard the function getCameraMatrix, but i want to make it in separate lines each value, but dont know how. Like if i do ctrl+v and get this: X: ETC Y: ETC Z: ETC LX: ETC LY: ETC LZ: ETC So far i have this, but cant do anything about it.. i cant output a table thought function GetCameraPos(thePlayer,cmd) local X, Y, Z, LX, LY, LZ = getCameraMatrix () outputConsole("X:"..X) outputConsole("Y:"..Y) outputConsole("Z:"..Z) outputConsole("LX:"..LX) outputConsole("LY:"..LY) outputConsole("LZ:"..LZ) local tableCreate = {} tableCreate.X = "X:"..X tableCreate.Y = "Y:"..Y tableCreate.Z = "Z:"..Z tableCreate.LX = "LX:"..LX tableCreate.LY = "LY:"..LY tableCreate.LZ = "LZ:"..LZ setClipboard("".. tableCreate .."") end addCommandHandler("camera", GetCameraPos, false,false) Thanks HyPeX
-
It does when the specified used space by the script (all rows/columns sumed) is bigger than the aviable.
-
Hi Guys, it has been a while since my v5, and after i gave up looking for recorders i decided to record it myself, so it is a mix of map show and quality test Enjoy Watching, and leave your feedback. (Yes i know it is dark, but it is due to the mp4 render.) Watch in HD! (720p) --------------------------------- Video Description:
-
The best way to make a moving image is with a shader.
-
What is the limit of peds on the server to not have LAG?
.:HyPeX:. replied to ronaldoguedess's topic in Scripting
Do you have any FPS lags? or is it delay ones?.. if it comes to delay it is as IIYAMA said, else its your pc whos fuking up and the script could'be okay. -
It was outside block 4, it was in block 5
-
Nvm, found out break was stopping the loop..
-
i got a strange problem, getElementsByType("player") only returns one player (from 20 online)... idk why..
-
Just dont use stuff you do not know about, you have to combine the functions with the race.
-
localplayer in client side is predefined by mta on client side: viewtopic.php?f=91&t=39678 it is not, if i dont add them, the script will fail.
-
Just nevermind, that was only a small part of the code: local teams = {} local teamacl = {} function CreateNewTeam(player, cmd, newteam, tagname, gettag) if not gettag then outputChatBox("Please Specify the command completly!", getRootElement()) return end if (isObjectInACLGroup("user"..(getAccountName(getPlayerAccount(player))), aclGetGroup("Admin"))) then -- Check team if not teams.newteam then for v, i in ipairs(teams) do -- Check name if string.match(teams.v.name, tagname) then return outputChatBox('Tag Name is already occupied!', player) end -- Check tag if string.match(teams.v.tag, gettag) then return outputChatBox('Tag recognizing is already occupied!', player) end end local gettaglower = string.lower(gettag) teams.newteam = {["name"] = ""..tagname.."", ["tag"] = ""..gettaglower.."" } teamacl.newteam = aclCreateGroup(newteam) triggerEvent("onCreateNewTeam", newteam) else outputChatBox("Team already exists!", player) -- Team already exists end else outputChatBox("You cant use this!", player) end end addCommandHandler("newteam", CreateNewTeam, false,false)
-
Yes, i did that myself on the script for avoid any mistakes, just like that, and it is all defined.
-
You have not downloaded the files, so it will not work. (since you did download="false")
-
V is returning the table that is inside of the "teams" table. For example, if you did this: for i, v in pairs ( teams ) do print ( tostring ( i ) ) end It would output: teamACL teamACL2 to the console. If you did this: for i, v in pairs ( teams ) do for i, v in pairs ( v ) do print ( v ) end end It would output: "" "" "Team 2" "[2]" to the console, if it makes scenes, sorry if i'm not clear enough. Yeah, it was in the end as i thought, thanks for the help!
-
Yeah, but newteam is defined, will it work? Like i wanna create a new team with the variable newteam (i set that variable each time the code is run) I'm not too sure what you mean... I want to create teams with the command /newteam, and the function takes: (player,cmd,newteam,tagname,gettaglower), and i want to create the teams with those variables.
-
Yeah, but newteam is defined, will it work? Like i wanna create a new team with the variable newteam (i set that variable each time the code is run)
-
Yeah just wanted to know if v was inside teams and not teams itself. About the second part, any idea? (JSON one) oh and edit: im using the setAccountData just for saving teams variable.
-
what im doing wrong here? '}' expected near '=' teams.newteam = {"name" = ""..tagname.."","tag" = ""..gettaglower.."" }
