Jump to content

emuk

Members
  • Posts

    25
  • Joined

  • Last visited

Everything posted by emuk

  1. I used the setModelHandling as it says on wiki function handlingChange() setModelHandling(541, "mass", 1890) setModelHandling(541, "turnMass", 3780) setModelHandling(541, "dragCoeff", 0.7) setModelHandling(541, "centerOfMass", {0.0, 0.1, -0.2} ) setModelHandling(541, "percentSubmerged", 75) setModelHandling(541, "tractionMultiplier", 0.70) setModelHandling(541, "tractionLoss", 0.90) setModelHandling(541, "tractionBias", 0.50) setModelHandling(541, "numberOfGears", 5) setModelHandling(541, "maxVelocity", 407) setModelHandling(541, "engineAcceleration", 50) setModelHandling(541, "engineInertia", 10) setModelHandling(541, "driveType", "awd") setModelHandling(541, "engineType", "petrol") setModelHandling(541, "brakeDeceleration", 11) setModelHandling(541, "brakeBias", 0.45) setModelHandling(541, "ABS", false) setModelHandling(541, "steeringLock", 30) setModelHandling(541, "suspensionForceLevel", 0.80) setModelHandling(541, "suspensionDamping", 0.20) setModelHandling(541, "suspensionHighSpeedDamping", 0.0) setModelHandling(541, "suspensionUpperLimit", 0.10) setModelHandling(541, "suspensionLowerLimit", -0.09) setModelHandling(541, "suspensionFrontRearBias", 0.5) setModelHandling(541, "suspensionAntiDiveMultiplier", 0.6) setModelHandling(541, "seatOffsetDistance", 0.3) setModelHandling(541, "collisionDamageMultiplier", 0.50) setModelHandling(541, "monetary", 1460000) setModelHandling(541, "modelFlags", 0xC0222004) setModelHandling(541, "handlingFlags", 0x1400000) setModelHandling(541, "headLight", 1) setModelHandling(541, "tailLight", 1) setModelHandling(541, "animGroup", 0) end addEventHandler("onResourceStart", resourceRoot, handlingChange) but it only works with cars created in the game, the cars spawned with the map are not changed, how can i do it ? I think I have to use "ipairs" but I have not found any tutorial on how to use it. who can help me ? thanks
  2. I had another idea: can I set to download only the map and the resource with the photo and after a few seconds with a timer download the rest?
  3. since no one wants to wait that finishes downloading resources, can I somehow to show an image (i have already a text but i prefer an image) during the download ? thanks
  4. thanks this is interesting
  5. Not needed. Do something like This: local mesg = "" addCommandHandler("say", function (player,_,msg) local time = getRealTime() local hours = time.hour local minutes = time.minute mesg = mesg.." [:"..hours..":"..minutes.."]"..msg end ) function LogTimer () File = fileOpen ("logs.txt") if File then fileWrite (File, mesg ) else fileCreate ("logs.txt") File = fileOpen ("logs.txt") fileWrite (File, mesg ) end fileClose (File) end setTimer (LogTimer, 300000, 0 ) -- updating log file in every 1 hour I wrote this from mobile so couldn't test it but anyways this Just an example. ⌒.⌒ I had thought of something like that but my mta server does not allow direct link then I do not know how to read the file from website which is located on a different server
  6. I would like to read the chat (or at least the last lines) of my server on my website in realtime, is this possibile to do ? thanks
  7. I'm selling vps: 10GB Diskspace 4 CPU cores RAM: 1 GB Bandwidth 1000GB 100 Mbps Port VPS Location: Germany OS: CentOS 6.3 64Bit - Debian 6.0.6 64/32Bit - Ubuntu 12.04.1 Server 64bit - Windows server 2008 Delivery after a few hours Price 10$/month
  8. emuk

    a simple question

    I have to create a new map near another that I created but I want to separate them. The question is:why if I start the old map and use the editor why I can not see it? I need to see the old but create a new near it ... how can I do? thanks
  9. thank you for your patience I think I understand it is one problem getElementData if i write this it work: local localPlayerName = getPlayerName(getLocalPlayer()) function vip () if (localPlayerName == "emuk") then --and we output it to the chatbox setElementData ( source, "VIP.person", true ) outputChatBox( "work." ) end end addCommandHandler ( "setvip", vip ) when i add this it say always no: function vip2 () if getElementData ( localPlayerName, "VIP.person" ) then outputChatBox( "yes." ) else outputChatBox( "no." ) end end addCommandHandler ( "s2", vip2 ) edit now i fixed some error
  10. thanks but I did not understand how to use ElementData, I tried to set something but it's like it does not save
  11. excuse my explanation, I need to stop the resource for one person and not for the entire server. I try to explain better: for example, a resource that is started automatically change hud and a player don't want it so with a command stop this function only for him. or I could put an option where each player decides whether or not to automatically start (but I do not know how to do) however i'll try it in another way
  12. thanks but I need something like this: visible = false addCommandHandler ( "show", function ( ) if ( visible == false ) then guiSetVisible ( Window, true ) else (here something to stop what happens before) end end ) basically I need to stop the resource for a player Do this until that happens otherwise stops. EDIT or if it possible to add a setting for client and everyone chooses if start it or not.
  13. it is possible to check some conditions ? for example: function true () while abc == true do outputChatBox( "Is true." ) end end addCommandHandler ( "true", true ) function setTrue () abc = true end addCommandHandler ( "settrue", settrue ) then until abc is true it outputChatBox and when is false it stops automatically (break) outputChatBox is an example, I do not want is that every second one written in chat thanks
  14. emuk

    warning problem

    thanks!! now it works
  15. emuk

    warning problem

    when I start the server why I get this warning ? WARNING: mapmanager\mapmanager_main.lua:6: Bad argument @ 'setGameType' [Expected string at argument 1, got boolean] thanks p.s also with the default server
  16. emuk

    warning problem

    when I start the server why I get this warning ? WARNING: mapmanager\mapmanager_main.lua:6: Bad argument @ 'setGameType' [Expected string at argument 1, got boolean] thanks p.s also with the default server
  17. thanks, very kind, it works
  18. Right, I had forgotten that in a server sided script onClientResourceStart function doesn't exist I had put the timer because I in another script without it did not work. however, now works but I'd like to put a timer to delete the objects after 3 seconds. I tried with DestroyElement but it does not work
  19. I want to create a script to do so when a player dies are created pieces where he died. The objects are id 2908-2907-2906-2905. I tried to do it this way but does not work. function morte () local myPosition = getLocalPlayer() local x, y, z = getElementPosition ( myPosition ) creaPezzi ( x, y, z ) end addEventHandler ( "onPlayerWasted", resourceRoot, onClientResourceStart ) setTimer ( morte, 1000, 1) function creaPezzi(x, y, z) createObject ( 2905, x, y, z ) createObject ( 2906, x, y, z ) createObject ( 2907, x, y, z ) createObject ( 2908, x, y, z ) end and I would also set a timer to delete those pieces after 2-3 seconds. how can I do? Thank you.
  20. emuk

    help me

    thank you very much !!
  21. emuk

    help me

    the server code: function cambiabuffalo () for i,v in ipairs(getElementsByType("vehicle")) do if getElementModel(v) == 402 then --buffalo setVehicleHandling(v, "mass", 1059.9) setVehicleHandling(v, "turnMass", 4099.9) setVehicleHandling(v, "dragCoeff", 2.0) setVehicleHandling(v, "centerOfMass", {0.0, 0.1, -0.48} ) setVehicleHandling(v, "percentSubmerged", 75) setVehicleHandling(v, "tractionMultiplier", 0.70) setVehicleHandling(v, "tractionLoss", 0.80) setVehicleHandling(v, "tractionBias", 0.47) setVehicleHandling(v, "numberOfGears", 5) setVehicleHandling(v, "maxVelocity", 350) setVehicleHandling(v, "engineAcceleration", 55.0) setVehicleHandling(v, "engineInertia", 5.0) setVehicleHandling(v, "driveType", "rwd") setVehicleHandling(v, "engineType", "petrol") setVehicleHandling(v, "brakeDeceleration", 8.0) setVehicleHandling(v, "brakeBias", 0.45) setVehicleHandling(v, "ABS", true) setVehicleHandling(v, "steeringLock", 55.0) setVehicleHandling(v, "suspensionForceLevel", 1.4) setVehicleHandling(v, "suspensionDamping", 0.15) setVehicleHandling(v, "suspensionHighSpeedDamping", 0.0) setVehicleHandling(v, "suspensionUpperLimit", 0.28) setVehicleHandling(v, "suspensionLowerLimit", -0.05) setVehicleHandling(v, "suspensionFrontRearBias", 0.5) setVehicleHandling(v, "suspensionAntiDiveMultiplier", 0.3) setVehicleHandling(v, "seatOffsetDistance", 1.25) setVehicleHandling(v, "collisionDamageMultiplier", 0.10) setVehicleHandling(v, "monetary", 35000) setVehicleHandling(v, "modelFlags", 0xc0000000) setVehicleHandling(v, "handlingFlags", 0x01780002) setVehicleHandling(v, "headLight", 1) setVehicleHandling(v, "tailLight", 1) setVehicleHandling(v, "animGroup", 1) end end end addEvent( "handlingcambiato", true ) addEventHandler ( "handlingcambiato", getRootElement(), cambiabuffalo ) setTimer ( cambiabuffalo, 1000, 0) and the client: function replaceModel () txd = engineLoadTXD ("buffalo.txd", true) engineImportTXD (txd, 402) dff = engineLoadDFF ("buffalo.dff", 402) engineReplaceModel (dff, 402) triggerServerEvent ( "handlingcambiato", getLocalPlayer()) end addEventHandler ("onClientResourceStart", getRootElement(), replaceModel)
  22. emuk

    help me

    I want to change handling to all the cars present and those that will be spawned, immediately and not after enter the car. I solved the problem by putting a timer infinite: setTimer ( changesultan, 1000, 0) and a triggerServerEvent. But I don't like this method. If I start a resource the player is removed from the car. someone recommend some method for me? thanks and sorry for my bad english. p.s I'd like that the handling is changed after replaced models txd and dff.
  23. emuk

    help with neon

    Who can tell me where to find or how to create a resource to add neon under car and bikes ? thanks
  24. hi all, I have a problem with the replacement of Vehicle Upgrades with custom. for example: exh_a_l.dff everything works but every time I add it to the car I have to restart the script... You can solve this problem without restarting for each component? thanks sorry for my bad english
×
×
  • Create New...