Jump to content

dragonofdark

Members
  • Posts

    203
  • Joined

  • Last visited

Everything posted by dragonofdark

  1. You can, but if someone is driving a modded vehicle while you create a new one, this person will be jacked from his car.
  2. No, you just need to make a function wich load and replace the model a second time : function replaceVeh() txd = engineLoadTXD("data/bullet.txd") engineImportTXD(txd,541) dff = engineLoadDFF("data/bullet.dff",541) engineReplaceModel(dff,541) txd = engineLoadTXD("data/:O.txd") engineImportTXD(txd,462) dff = engineLoadDFF("data/:O.dff",462) engineReplaceModel(dff,462) txd = engineLoadTXD("data/copcarsf.txd") engineImportTXD(txd,597) dff = engineLoadDFF("data/copcarsf.dff",597) engineReplaceModel(dff,597) txd = engineLoadTXD("data/androm.txd") engineImportTXD(txd,592) dff = engineLoadDFF("data/androm.dff",592) engineReplaceModel(dff,592) txd = engineLoadTXD("data/cargobob.txd") engineImportTXD(txd,548) dff = engineLoadDFF("data/cargobob.dff",548) engineReplaceModel(dff,548) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceVeh) function reload () setTimer(replaceVeh, 1000, 1) -- make the modding function to load a second time after 1 second end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), reload But there is just a little problem, the modded vehicles must be already created as the collision will not load. I.E.: If you start the resource which change the vehicles models, and then you create a vehicle with the admin panel, the collision will not load.
  3. I didn't see any problem about the money
  4. Hey 50p, Really good resource but you should upgrade it as there are a lot of errors with the gui.
  5. Why don't you ban this member from the community center ? As he will continue...
  6. Please delete all sloth's resources... Car mods https://community.multitheftauto.com/index.php?p=resources&s=details&id=2785 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2788 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2789 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2791 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2790 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2792 https://community.multitheftauto.com/index.php?p=resources&s=details&id=2793
  7. Ah ! It works for my first problem For the second, I did : function saveUpgrades( vehicle ) if vehicle then local data = vehicles[ vehicle ] if data and data.vehicleID > 0 then local tableUpgrades = getVehicleUpgrades(vehicle) local upgrades1 = table.concat(tableUpgrades, ",") local paintjob1 = getVehiclePaintjob(vehicle) local success, error = exports.sql:query_free( "UPDATE vehicles SET upgrades = " .. upgrades1 .. ", paintjob = " .. paintjob1 .. " WHERE vehicleID = " .. data.vehicleID ) if error then outputDebugString( error ) end end end end But I have this error : [2011-08-31 17:24:18] INFO: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1074, paintjob = 1 WHERE vehicleID = 8' at line 1 The paintjob insn't a problem, it load to the server correctly, and export to SQL correctly too.
  8. Hello, I restart the topic because I've 2 news problems related to MySQL and upgrades. 1°) My server loads upgrades from the SQL database and put the upgrades on the vehicles, but if there is only ONE upgrade, it wont load it and stops the script. (In my database I have ie: 1074,1139 if I want it loads correctly and 1074 if I want it fails to load) The script : local upgrades = split( data.upgrades, 44 ) for index, upgrade in pairs (upgrades) do addVehicleUpgrade( vehicle, upgrade ) end The error : [2011-08-31 16:34:23] WARNING: vehicles\vehicles.lua:137: Bad argument @ 'split' [2011-08-31 16:34:23] ERROR: vehicles\vehicles.lua:138: bad argument #1 to 'pairs' (table expected, got boolean) So.. How can I make it to load the upgrade if it has only one upgrade ? 2°) I want for the script to save all upgrades the vehicle has into my SQL table. How can I make that ? The string in the table should be just a number if I have only one upgrade and some numbers if I have some. Ex: One upgrade (Mega wheel on Sultan) => 1074 (without any quote) 2 upgrades (Mega Wheel and X-flow spoiler on sultan)=> 1074,1139 (without any quote but just a "," behind) 3 upgrades (Mega Rim, X-flow spoiler and rear X-flow on sultan)=> 1074,1139,1140 (without any quote but just a "," behind each. .... ... Thanks a lot ! (I'm really sorry if my english sucks )
  9. Hello, I would like to know how to modify the radar texture, like the Gamesnert's beta server. Thanks.
  10. Réessaye avec "Recommencer" et si ça ne fonctionne pas réinstalle MTA.
  11. Hello, I'm currently owning a RolePlay server which is starting to be bigger in players and scripts. So, I would like to know which VPS hosting to choose for it. I would like a VPS which could support 32 players but not too expensive as we don't have a big budget for now. Also, what specifications are needed to run it ? I found J-solutions but I don't know if I can believe them. Thanks.
  12. Doesn't work again. Tested with "1158,1160" and 1158,1160. EDIT : I have tried with the vehiclesaver system and it works now.
  13. It won't work anyway. In mySQL I've tested with "1158,1160" and 1158,1160. Do you want for I send you the script by PM to see yourself where is the problem ?
  14. I can't understand when you want to turn it back into a table =/
  15. Hello, I would like to make a vehicle's upgrades saver with mySQL. Each vehicle created in the server is stocked in a database with an ID for each. In each vehicle line, I have X ref, Y, ref, Z ref, engine state,... I've added the case which will contain all the vehicle upgrades, if it has. But I don't know what I can put in this case to load the upgrades IG. In mind that I must have more than one upgrade in it. My upgrades case : I tested [{"1158","1160"}] as the vehicle is a Jester but it doesn't work. I'm based on an other system of weapons wich had [{"30":89,"43":82,"24":90}] in his case. (By exemple 30 for weapon ID and 89 for ammo) Also, what can I put in my script to load them ? The weapon system : if char.weapons then local weapons = fromJSON( char.weapons ) if weapons then for weapon, ammo in pairs( weapons ) do giveWeapon( source, weapon, ammo ) end end end The upgrades system : if data.upgrades then local upgrades = fromJSON( data.upgrades ) if upgrades then for upgrade in pairs( upgrades ) do addVehicleUpgrade( vehicle, upgrade ) end end end I think the problem is the "fromJSON" thing and the [{"XX","XX",}]. I had some things to set up in my script and I can't find what can be the problem other than that. Thanks
  16. Hm... When the rotating light faces at my camera, the opacity of this light is like at 255. When it flashs at the same direction of my camera, the opacity is like at 0. Like a real rotating light. You don't really help me.
  17. I think that is enought comprehensible... I want to hide the marker.
  18. Hello, I would like to know if there is a way to hide a corona marker by an object. If I'm good, at a certain distance, a marker is hidden if an object is in front of it. But I'm planning to make a sort of rotating light and the object which will be in front of the corona will not hide this corona... Could you help me ? Thanks. PS : I can't test anything before this sunday
  19. Normally I can attach to elements that are already attached, as I did that somewhere in an other script. I'll try to attach the lights to the vehicle so..
  20. I couldn't try if I haven't a reply for the first question
  21. Hello, I'm working on a lighting signal system. But I have a little problem with function "getElementByID". My system work like that : - I make a command to create/destroy a big pannel which the lights will be attached to. - I make a command to create lights, attach them to the pannel and let them blink. So, here is the script (i removed some attachElements and createMarker because there are a lot of lights) --create panel function createBali( player, cmd ) local balisage = getPedOccupiedVehicle(player) local x,y,z = getElementPosition( balisage ) balis = createObject(2789, x, y, z) attachElements(balis,balisage,0,-5.75,1.5,0,90) end --delete panel function deleteBali( player, cmd ) destroyElement(balis) end addCommandHandler ( "balisage1", createBali) addCommandHandler ( "balisage10", deleteBali) --right direction function lightsOpen1 ( player, cmd ) balis = getElementByID(balis) fld1 = createMarker ( 0,0,0,"corona",0.2,255,165,0) -- and a lot of same code attachElements ( fld1, balis, -1.5, -0.1, -1 ) -- and a lot of same code end addCommandHandler ( "flechedroite", lightsOpen1 ) As you can see at line 20, I put a getElementByID because without that, I have a "bad argument @ attachElements" And here start the problem... I have also a bad argument but at getElementByID . --------------------------------------------------- Second question : How can I made the lights to blink like if I do: -createMarker -destroyElement -createMarker -destroyElement -...... -...... with a blink speed of 250ms. ( In mind that I have 17 markers) Thanks in advance, dragonofdark
×
×
  • Create New...