Jump to content

Charlie_Jefferson

Members
  • Posts

    242
  • Joined

  • Last visited

Everything posted by Charlie_Jefferson

  1. Uh. About the If statement, wanted to test something and forgot to take it off. :3 I know how to script and I've read the scripting introduction. I've scripted for a server too. What's invalid with the rancher.txd and rancher.dff? I've checked debugscript too, before adding the if statement and nothing was wrong. Thank you for editing the script. Edit: It works, but I still don't get what "Rancher.txd/rancher.dff are invalid.". I understand their invalid but what does invalid mean?
  2. Uploaded the .zip file. http://www.mediafire.com/?yssu1ezwihte62e
  3. Sunt uimit de chestia cu femeile, . Oricum, am inceput sa lucrez un pic.
  4. I edited it and took the type part out. The vehicles are still not replaced... This is stressing me out. The script has no errors and it should work, although it doesn't. Help please.
  5. Deci se mai face sau nu? (Ma indoiesc ca se mai face) Oricum, am niste prieteni care sunt interesati in a face, problema e ca nu avem hosting. Apropo, eu am 13 ani, si prietenii mei au 12, respectiv 13. Eu stiu sa scriptez, din fericire, dar nu sunt cel mai bun. Am un login/register GUI, trebuie facute functiile. Ne gadeam la un Romanian RP server, sau un freeroam, ceva. Deja am pus masini romanesti(dacia) si altele(bmw, land rover, range rover, trabant), mai ramane login/register si niste chestii de RP.
  6. I think it's something wrong in the meta.xml. Do the DFF's and TXD's new a type = client?
  7. Thanks Zango, but I'd rather keep my code, which I know how it's working, rather then copying an unknown code. I just need to get this working.
  8. This is the meta. <meta> <info author="Charlie" type="script" description="Replace vehicles with Romanian cars :o"/> <script src="rvhs.lua" type="client"/> <file src="txd/stallion.txd" type="client"/> <file src="dff/stallion.dff" type="client"/> <file src="dff/huntley.dff" type="client"/> <file src="txd/huntley.txd" type="client"/> <file src="txd/sentinel.txd" type="client"/> <file src="dff/sentinel.dff" type="client"/> <file src="dff/regina.dff" type="client"/> <file src="txd/regina.txd" type="client"/> <file src="txd/peren.txd" type="client"/> <file src="dff/peren.dff" type="client"/> <file src="dff/comet.dff" type="client"/> <file src="txd/comet.txd" type="client"/> <file src="dff/club.dff" type="client"/> <file src="txd/club.txd" type="client"/> <file src="dff/buffalo.dff" type="client"/> <file src="txd/buffalo.txd" type="client"/> <file src="dff/admiral.dff" type="client"/> <file src="txd/admiral.txd" type="client"/> </meta>
  9. I thought so, about the event, thanks. I'll test it soon. Edit: It doesn't work. The script loads fine, but the cars won't change to the DFF's and TXD's defined by the script.
  10. function replacevehs () dustertxd = engineLoadTXD ( "txd/rancher.txd" ) engineImportTXD ( dustertx, 489 ) dusterdff = engineLoadDFF ( "dff/rancher.dff", 489 ) engineReplaceModel ( dusterdff, 489 ) d1310txd = engineLoadTXD( "txd/admiral.txd" ) engineImportXD ( d1310txd, 445 ) d1310dff = engineLoadDFF ( "dff/admiral.dff", 445 ) engineReplaceModel ( d1310dff, 445 ) bmwm5e34txd = engineLoadTXD ( "txd/sentinel.txd" ) engineImportTXD ( bmwm5e34txd, 405 ) bmwm5e34dff = engineLoadDFF ( "dff/sentinel.dff", 405 ) engineReplaceModel ( bmwm5e34dff, 405 ) trabant601txd = engineLoadTXD ( "txd/stallion.txd" ) engineImportTXD ( trabant601txd, 439 ) trabant601dff = engineLoadDFF ( "dff/stallion.dff", 439 ) engineReplaceModel ( trabant601dff, 439 ) rangerovertxd = engineLoadTXD ( "txd/huntley.txd" ) engineImportTXD ( rangerovertxd, 579 ) rangeroverdff = engineLoadDFF ( "dff/huntley.dff", 579 ) engineReplaceModel ( rangeroverdff, 579 ) reginatxd = engineLoadTXD ( "txd/regina.txd" ) engineImportTXD ( reginatxd, 479 ) reginadff = engineLoadDFF ( "dff/regina.dff", 479 ) engineReplaceModel ( reginadff, 479 ) perentxd = engineLoadTXD ( "txd/peren.txd" ) engineImportTXD ( perentxd, 404 ) perendff = engineLoadDFF ( "dff/peren.dff", 404 ) engineReplaceModel ( perendff, 404 ) comettxd = engineLoadTXD ( "txd/comet.txd" ) engineImportTXD ( comettxd, 480 ) cometdff = engineLoadDFF ( "dff/comet.dff", 480 ) engineReplaceModel ( cometdff, 480 ) clubtxd = engineLoadTXD ( "txd/club.txd" ) engineImportTXD ( clubtxd, 589 ) clubdff = engineLoadDFF ( "dff/club.dff", 589 ) engineReplaceModel ( clubdff, 589 ) buffalotxd = engineLoadTXD ( "txd/buffalo.txd" ) engineImportTXD ( buffalotxd, 402 ) buffalodff = engineLoadDFF ( "dff/buffalo.dff", 402 ) engineReplaceModel ( buffalodff, 402 ) end addEventHandler("onClientPlayerJoin", root, replacevehs) I've got a problem with this code. I want to replace some vehicles dff's and txd's, but unfortunately it won't work. The sources are added in the meta.xml(file src="blabla"), so I've got no idea why it won't work.
  11. Then set the element data to deattached and when the /attach thing is done, check if the element data(for the player) is the one with deattach. If it is, then cancelFunction, or somethin'.
  12. Use the setTimer function to disable the command for 2 seconds.
  13. function excelToDriver ( target ) if getElementType(target) == "vehicle" then if getPedWeapon(source) == 23 then speedx, speedy, speedz = getElementVelocity ( target ) actualspeed = (speedx^2 + speedy^2 + speedz^2)^(0.5) kmh = actualspeed * 180 outputChatBox("* Prędkość namierzonego pojazdu wynosi: "..math.floor(tonumber(kmh)).. " KM/h.", getRootElement(), 255, 255, 255, true) end end end addEventHandler ( "onClientPlayerTarget", getRootElement(), excelToDriver)
  14. Aibo. It's not working and gives no error.
  15. I actually do have an onboard graphics system. It might've been that. I accidentally tapped my keyboard when opening MTA. Didn't know about it. Thanks!
  16. I opened MTA today and saw this: No, I didn't rotate the image, that's how my MTA looks when I open it. I can't find anything about this in settings, or in this section. Help. Edit: It doesn't show up correctly in the image, what the heck... On my screen, it shows like 90 grades around. Edit2: After reinstalling MTA, it worked. I suggest the Dev team fixes this bug.
  17. Thanks Aibo, didn't know about the string. About the == 1 or == 2 or == 3, yeah, could have made it shorter, sorry. About the addEventHandler, I moved it under the place where the marker's created, right under it and seems like he moved it. Will try it out soon and tell you.
  18. We tried it, but no success. No error and it doesn't work.
  19. For the backgate thing: local theMarker = createMarker ( -1250.1999511719, 463.89999389648, 9.60000014697, "cylinder", 10, 0, 0, 255, 0 ) subwaygate = createObject (-1250.1999511719, 463.89999389648, 9.60000014697, 0, 0, 0 ) -- Make Marker and Gate function openGate ( hitElement ) if (getElementType(hitElement) == "player" ) then moveObject ( subwaygate , 1500, -1701.7937011719, 689.03674316406, 24.037502288818, 0, 0, 0 ) -- Changed 'gate' to 'subwaygate' end end addEventHandler( "onMarkerHit", theMarker, openGate ) -- Open Gate function closeGate ( leftElement ) if (getElementType(leftElement) == "player" ) then moveObject ( subwaygate, 1500, -1250.1999511719, 463.89999389648, 9.60000014697, 0, 0, 0 ) end end addEventHandler( "onMarkerLeave", theMarker, closeGate ) -- Close Gate And front gate: local theMarker = createMarker ( -1530.3000488281, 482.20001220703, 9.6999998092651, "cylinder", 0, 0, 255, 0) subwaygate = createObject ( subwaygate, -1530.3000488281, 482.20001220703, 9.6999998092651, 0, 0, 255, 0 ) -- Changed 'gate' to 'subwaygate' -- Define Marker and Gate function openGate ( hitElement ) if (getElementType(hitElement) == "player" ) then moveObject ( subwaygate, -1530.3000488281, 482.20001220703, 9.6999998092651, 0, 0, 0, 0 ) end if (getElementType(hitElement) == "vehicle" ) then moveObject ( subwaygate, -1530.3000488281, 482.20001220703, 9.6999998092651, 0, 0, 0, 0 ) end addEventHandler( "onMarkerHit", theMarker, openGate ) -- Open Gate function closeGate ( leftElement ) if (getElementType(leftElement) == "player" ) then moveObject ( subwaygate, -1530.3000488281, 482.20001220703, 9.6999998092651, 0, 0, 0, 0 ) end end addEventHandler( "onMarkerLeave", theMarker, closeGate ) -- Close Gate
  20. 1. Okay. 2. If we only help you, you'll never learn. Most people come here and ask for help, on any script they make.
  21. What did you do!? You fixed it for him ;(. I wanted to make him believe he made a mistake, so he can figure it out. If he wasn't able to, then he must learn more.
×
×
  • Create New...