Jump to content

igthomas

Members
  • Posts

    62
  • Joined

  • Last visited

Everything posted by igthomas

  1. Today I was just messing in the MTA folder and I saw all the scripts of the servers I went to. And some are compiled and some not but most are compiled like: C:/Program Files/folder/folder/.../scripts.lua and then its compiled normally. Could someone explain me how it works and how could I make the same with my scripts? Thanks
  2. igthomas

    Radio chat

    haha Thanks it works
  3. igthomas

    Radio chat

    I want to make a chat like mainchat but when you press R it is Orange and begins like **(Radio)Name: Text, over** and I don't know how to do it Could you guys at least give me what function should I use please
  4. Thanks Castillo that's what I wanted and it worked
  5. Guys I have another problem now: only FBi can enter car and only they can seat as passanger so if I spawn as another skin I couldn't even press g
  6. Thanks ZverCR it worked and this mistake won't happen again ;P and last question is it possible to change the car color with createVehicle? or should I make a new function where I mention the car colors?
  7. Tried and same problem everyone can enter
  8. Here's a script that I've made but the problem is that everyone can enter the vehicles not only FBI fbi1 = createVehicle ( 596, -2429.7998046875, 515.2998046875, 29.700000762939, 0, 0, 215.99670410156 ) fbi2 = createVehicle ( 596, -2425.69921875, 518.5, 29.700000762939, 0, 0, 221.99523925781 ) fbi3 = createVehicle ( 596, -2422.3994140625, 521.599609375, 29.700000762939, 0, 0, 225 ) function lockfbi(player, seat, jacked) if (source == fbi1 and source == fbi2 and source == fbi3) then local skin = getElementModel (thePlayer) if ( skin == 100 or skin == 255) then return end cancelEvent() outputChatBox ( "Only FBI can enter this vehicle", player, 0, 0, 150, true ) end end addEventHandler ( "onVehicleStartEnter", getRootElement(), lockfbi )
  9. ok my brain is getting hot now :@ Well here's how I did my structure: Resources -Parts ----data ------elegy1.txd ------elegy2.txd ------elegy3.txd ------exh_a_l.dff ----script.lua ----meta.xml script.lua: function replaceModel() outputChatBox ( "> replacing the elegy vehicle" ) outputChatBox ( "> replacing paintjob1" ) paintjob1 = engineLoadTXD ( "data/elegy1.txd" ) engineImportTXD ( paintjob1, 562 ) outputChatBox ( "> replacing paintjob2" ) paintjob2 = engineLoadTXD ( "data/elegy2.txd" ) engineImportTXD ( paintjob2, 562 ) outputChatBox ( "> replacing paintjob3" ) paintjob3 = engineLoadTXD ( "data/elegy3.txd" ) engineImportTXD ( paintjob3, 562 ) outputChatBox ( "> replacing exh_a_l" ) exh_a_l = engineLoadDFF ( "data/exh_a_l.dff" ) engineImportDFF ( exh_a_u, 1034 ) end addEventHandler ( "onClientResourceStart", getResourceRootElement(getThisResource()), replaceModel) addCommandHandler("replacecars", replaceModel) meta.xml: type="script" description="Car parts" author="Thomas" version="1.0.0" name="parts" /> When I start the resource I do /replacecars then I show me that it has replaced the car parts and it even rejects me from my car when I'm in and when I tune it. It doesn't show me the paintjobs and the exhaust is like from the original elegy Xeno@ Thanks man, I've read the entire scripting guide even from other sites and other tutorials and all functions and events and it didn't help me with this problem
  10. Strange I did everything like in the wiki and still not working outputChatBox ( "> replacing the uranus vehicle" ) txd = engineLoadTXD ( "data/uranus.txd" ) engineImportTXD ( txd, 558 ) dff = engineLoadDFF ( "data/uranus.dff", 558 ) engineReplaceModel ( dff, 558 ) outputChatBox ( "> replacing paintjob1" ) paintjob1 = engineLoadTXD ( "data/uranus1.txd" ) engineImportTXD ( paintjob1, 558 ) outputChatBox ( "> replacing paintjob2" ) paintjob2 = engineLoadTXD ( "data/uranus2.txd" ) engineImportTXD ( paintjob2, 558 ) outputChatBox ( "> replacing paintjob3" ) paintjob3 = engineLoadTXD ( "data/uranus3.txd" ) engineImportTXD ( paintjob3, 558 ) outputChatBox ( "> replacing exh_a_u" ) exh_a_u = engineLoadDFF ( "data/exh_a_u.dff" ) engineImportDFF ( exh_a_u, 1089 )
  11. Hi I'm new in the MTA Community but not very new in scripting so I know some basics. What I want is to import elegy1.txd, elegy2.txd,... And tuning parts like bumper, exhausts, etc Is that possible?
×
×
  • Create New...