Jump to content

MisterQuestions

Members
  • Posts

    460
  • Joined

  • Last visited

Everything posted by MisterQuestions

  1. Actually map info is loaded with map, at least on your gamemode and on lot of gamemodes. Map name must be as the renamed one with no problem without refreshing, since you just open the meta.xml file to get all map data.
  2. Hey there, im here cause im having some issues with CEF Browser, the problem is that isn't showing the web-site color and i don't really know why. Original: MTA Browser:
  3. Hey there! I want to ask if its actually possible to remove shadows form a ped/player, and how i could do it?
  4. Lol There's actually no problem on load functions. But somehow this is happening on that server. (using linux/x64)
  5. Is actually possible? As far i know image will be always looking to player's camera.
  6. Not really, tried on it, but it doesnt rotate as the way i want, just faces to some place. I need to rotate it. Just as dxDrawImage
  7. Lol creating and loading one texture for each 360... Cant be possible.
  8. Hey there! I want to ask if is possible to make/add rotation into an image drawed with 'dxDrawMaterialLine3D'.
  9. Well, maybe... caused by map stop, since on race maps are stoppped & started just as normal resources. Maybe when this resource is stopped camera auto-fades. Sometimes happened to me with freeroam too.
  10. Hey there! Well i was loading some map script (from Flo v6). And everything is supposed to work just fine but when scriptloader tries to load some script gets me this error from loadstring. 'binary string: bad constant in precompiled chunk'. So.. also gives me an error with setfenv.
  11. puedes hacer un export con el freeroam resource para que le de unbind o algo asi. Igual puedes usar getFunctionsBoundToKey, para quitar todas las funciones bindeadas a esa key.
  12. Hmmm, ¿almacenarlos en una tabla? ¿Y cuando no existan ya? ¿qué? Es una opción pero bueno, busca la mejor manera.
  13. Usar setElementData, con una tabla si tiene bastantes datos no creo sea conveniente. Esto se debe a que cuando se setea un dato ya sea en el cliente o el servidor, se sincronizan. Y por ende consume un ancho de banda, y si no es nada ligero, no será conveniente.
  14. Lol tan simple con un... La función getElementsByType tiene la opción "startat", en ese caso usamos resourceRoot, el cual nos daría los children siempre y cuando sean del tipo que queremos. getElementsByType("player/object/etc",resourceRoot)
  15. Puedes hacer que la escala sea de 1 y un porcentaje mínimo, y solo multiplicas el tamaño del rectangulo * escala.
  16. This'll fix the problem: local foundPlayer = getPlayerFromName("name") if (foundPlayer ~= nil) then setElementData(foundPlayer ,"data",value) end Yeah i though about it, but as he said with "runcode" i didn't wanted to make a longer code lol
  17. Not really good idea cuz if can't find a player on some name, set element data will give a error. but if you want to continue.. should look like.. setElementData(getPlayerFromName("name"),"data",value)
  18. What? No tiene nada de sentido lo que has dicho.
  19. Source no existe en un comando. Source es de el elemento que triggea algún evento. Ahora, addCommandHandler en server side la function tendría que verse así. addCommandHandler("hi", function(player,cmd,arg1,...) end ) Ahora si es cliente no nos puede devolver un player ya que solamente puede haber un player ahi, el cual es el client, el localPlayer pues. addCommandHandler("hi", function(cmd,arg1,...) end ) Revisa que estes poniendo los argumentos correctos. Y si hay algún error del debug, facilitalo. El code que te han facilitado arriba funciona perfectamente.. addCommandHandler( "hi", function( player ) outputChatBox( "ola" ) setPedAnimation (player, "carry", "crry_prtial", 0, false, true, false, true) end ) Mira una screen.
  20. Hmmm okay... Tal vez no sea lo correcto. Pero ten una base. No solo copies y pegues. Entiende un poco el código así aprendes & se te facilita en el futuro local messages = {} function onChatted(message,type) if not messages[source] then messages[source] = {} end table.insert(messages[source],{ tick = getTickCount(), message = message, type = type, }) end addEvent("server:sendedChat",true) addEventHandler("server:sendedChat",root,onChatted) function onQuit() if messages[source] then messages[source] = nil end end addEventHandler("onClientPlayerQuit",root,onQuit) function onRender() for _,player in pairs(getElementsByType("player")) do local messages = messages[player] -- blah. -- loopea los messages & dibujalos. -- con el tick despues de cierto tiempo has que se remuevan. (getTickCount() - message.tick > tiempo_max debería funcionar) end end addEventHandler("onClientRender",root,onRender)
  21. Bien esto se complico más de lo que en realidad es... Así que ten.. un código más simple. Tal vez no sea la mejor opción pero debería funcionar. * No lo he testeado. local scale = 1 local scaleSpeed = 0.25 local maxScale = 2 local minScale = 1 function magicRender() if isMouseInPosition(x,y,sx,sy) then --Checamos si esta en la posición para aumentar la escala, si no pues... solamente la baje lol. scale = math.min(maxScale,scale + scaleSpeed) -- min nos debería de dar la maxScale cuando scale + scaleSpeed sea mayor que el máximo.. else scale = math.max(minScale,scale - scaleSpeed) -- max nos debería de dar el minScale si es menor. end dxDrawText("blah",x,y,x + sx,y + sy,tocolor(255, 255, 255, 255), scale, "default", "left", "top", false, false, false, false, false) -- solo dibujalo y ya está. end addEventHandler("onClientRender",root,magicRender)
  22. Hice eso pero a medida q la barra va pasando se queda abajo el texto function renderizar_progreso( ) progreso_barra = progreso_barra + 0.4 if progreso_barra >= 300 then removeEventHandler( "onClientRender", root, renderizar_barras ) removeEventHandler( "onClientRender", root, renderizar_progreso ) end end addEventHandler( "onClientRender", root, renderizar_progreso ) function renderizar_barras( ) dxDrawRectangle((screenW - 23) / 2-131, (screenH - 10) / 2, 300, 25, tocolor(0, 0, 0, 160), true) dxDrawRectangle((screenW - 23) / 2-131, (screenH - 10) / 2, progreso_barra, 25, tocolor(0, 255, 0, 255), true) dxDrawBorderedText ("Drogandose",(screenWidth - 15) / 2 -120, (screenHeight - 10) / 2, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 2, "sans" ) dxDrawText ("Drogandose",(screenWidth - 15) / 2 -120, (screenHeight - 10) / 2, screenWidth, screenHeight, tocolor ( 255, 255, 255, 255 ), 2, "sans" ) end addEventHandler( "onClientRender", root, renderizar_barras ) Solucionado, gracias a los 2 No sería más simple dejar en un solo render los dos? No habría ningún problema & así es menos funciones a lo loco
  23. Deja el onClientRender activo, no creo haya tanto problema. Puedes usar una tabla para poner messages[player♥ = {...} Y haga render a todos los mensajes. Obviamente has que se vayan removiendo despues de un tiempo. Si la tabla esta vacia al final, usa messages[player] = nil y asi checas si tienes que hacer render a ese jugador. o igual si ese jugador tiene #messages[player] ~= 0 entonces dibuje lo que haya. No sé si me explique bien...
×
×
  • Create New...