Jump to content

Tremidinha

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Tremidinha

  1. Hi I have a problem with the function fetchRemote. I hope you can help me. Server Side: function startImageDownload( playerToReceive ) fetchRemote ( "www.exemple.com/exemple.png", myCallback, "", false, playerToReceive ) end addCommandHandler("down",startImageDownload) function myCallback( responseData, errno, playerToReceive ) if errno == 0 then triggerClientEvent( playerToReceive, "onClientGotImage", resourceRoot, responseData ) end end Client Side: addEvent( "onClientGotImage", true ) addEventHandler( "onClientGotImage", resourceRoot, function( pixels ) local file = fileCreate( pixels..".png" ) if ( file ) then outputChatBox("Test") fileWrite( file, pixels ); fileClose( file ); end end ) I think the code is right but there appears no error and the file is not created, someone could help me or explain to me why this happens?
  2. but the getCursorPosition and () as it does?
  3. Well, I had done an earlier topic of how to make a dxDraw stay in the same position in all resolutions so I made this topic: viewtopic.php?f=91&t=46381 and I did, but only run for dxDrawRectangle and dxDrawImage. So was wondering how does dxDrawText leaving the same position at all resolutions and take the same position of the mouse for all resolutions. Thanks, I await answers. Google Translator owna
  4. hi, wanted to know how do to get information from a website and put in the server. Like a "triggerServerEvent" but instead of server would be the website. I know this is possible because my friend knows how to do it but did not want to reveal to me, please help me. I await answers.
  5. So I was doing a script from a plane that flies airports, for it created a ped and put him to drive, but when the plane walks away and disappears commands ped stops working and the plane crashes. Could someone tell me how to solve this? Code: ↓↓ Server: function _setPedControlState(ped, key, value) triggerClientEvent("controlState",getRootElement(),ped,key,value) end function start() Element = {} Element.Ped = createPed(0,-1596.01953125,-125.279296875,14.1484375) Element.Veiculo = createVehicle(592,-1606.5439453125,-113.8740234375,20.1484375,0,0,315.35913085938) Element.Dimension = 0 Element.numMarker = 0 AllElements = {(Element.Ped),(Element.Veiculo)} for i,v in ipairs(AllElements) do setElementDimension(v,Element.Dimension) end createBlipAttachedTo(Element.Ped,5) setTimer(warpPedIntoVehicle,1000,1,(Element.Ped), (Element.Veiculo)) setTimer(_setPedControlState,2000,1,(Element.Ped), "special_control_down", true ) setTimer(_setPedControlState,7000,1,(Element.Ped), "accelerate", true ) for i,v in ipairs(getElementsByType("player")) do setElementSyncer ( (Element.Veiculo), v ) end end addEventHandler("onResourceStart",getRootElement(),start) Client: function control(ped,key,value) setPedControlState ( ped, key, value ) end addEvent("controlState",true) addEventHandler("controlState",getRootElement(),control)
  6. How to make a window dx in a position of the screen in all resolutions?
×
×
  • Create New...