Jump to content

Gamesnert

MTA Contributors
  • Posts

    2,035
  • Joined

  • Last visited

Everything posted by Gamesnert

  1. I don't really see what's better with strings that tostring(number) or something... Oh well, do what's the best choise.
  2. I LOLed @ line 2: "if flashing == false or not flashing then". Or not flashing... Anyway, onClientRender is executed every frame, right? If so, you might want to set something like a var that counts how many times it had been executed. Or does getTickCount serve for that? =/ And note that this doesn't seem to be synched... I think others want to see these flashing headlights too. @Shigawire: Still, is that a piece of code to check their ammo etc?!? That's just way too big! Also, try out some of the events I gave you once! Might decrease it's amount of lines to... Dunno... Alot less?
  3. How did you get your weapon script so large? And it loops every 150 ms? NOT GOOD...
  4. Numbers are easier, you can make a table with all the number vehicles and they're easy to loop. You can do a for or a while loop that constantly reads out 1 ID higher, instead of that you have to type words. So words are more limited, a lot more vehicles are supported by numbers or words+numbers.
  5. 50 ms repeadetly? 1000:50=20 times/second. If your script then is approx 5 lines each time (example) then your PC will lag! I think like 100ms is even too fast! Although when you set it higher, players will tell it lag. So what? Do they want the GUI, or their PC to lag?
  6. OHNOZ! Then we're doomed!! (until dp2.4 or maybe until dp3...)
  7. ID="1", ID="2" etc is most recommended by me. And when all of your vehicles have numeric ID's, you can easily loop through them with getElementByID and destroy them by command. Making them appear again is another story... But... Ehm... Store them in tables perhaps..?
  8. Yeah, so getting usernames is quite useless ATM. What's quite usefull is DP2.1!! Because I still have a unique username and serial. ^^ Anyway: Can't you edit your username and serial in your registry? Ok, editing serial would be quite USELESS... But change of username would make scripts like these capable for a bit again.
  9. Ok: 1. To fix falling in the beginning, set posZ a little higher. 2. There is event "onPlayerWasted". Just like you handled "onPlayerJoin" you should handle wasted, only remove some join thingies and add some death thingies. 3. I would suggest to also make it create it from names. Command for that is HERE. 4. Nice, jetpacks!! 5. I would suggest looking for a map editor in the RESOURCES LIST. (examples: Medit, alternate map editor of offedit) 6. Then we understand why you asked it. I think I'm going to make a big tutorial for Lua, since we would like to avoid questions like these. But if you don't know how something works or whatever: look for yourself first, and then ask.
  10. Nonono, I said <map src="mapname.map"/> And the quotes should stay how they are!
  11. He scripted it himself I think. He just made a scripting command for it. But I would suggest to do what 50p said. Very simple guide: 1. Create a new file in Notepad 2. Type: 3. Press enter, and type 4. Press enter again, and type 5. Go save the file in the same directory as your other script files. Save it with a name like: "map.map" or "anything.map". Aslong as you do not forget .map! Now you got yourself a map file. Now go to meta.xml (should be in the same folder as your map file) and add: Then, you are done. You have successfully created a vehicle! (well, I hope so...) Also: Try changing posX, posY and posZ. To something like next to your own spawnpoint. Might make it easier since you then don't have to look for your vehicle. If you want to rotate the vehicle by the way, change rotZ! Not X or Y since it'll rotate in directions you most likely don't want to be changed...
  12. Nonono, not talking about quick connect. Not talking about software actually. I'm talking about your internet. Does your internet have a router? A small little device you can connect 4+ computers to? Often used in combination with high(er)-speed-internet?
  13. Unfortunately it is not working for me. I did like you and faq said and still nothing. My version of GTA:SA is european 1.0 @ WinXP Pro Can you describe why it didn't work? You were unable to start GTA? Or something? Or didn't the resolution change?
  14. Nope. Are you connecting through a router? If so, have you portforwarded correctly? (I didn't have to(lucky me(heh(heh(heh)))))
  15. For resolution: I always get a pop-up screen from GTA before I can start MTA, since I have dual-screen. The other way is setting the resolution higher in GTA itself. Just start plain GTA, go to options and do what ya wanna do.
  16. Someone can make it, yes. That one, however... Is you. Read the scripting introduction to find out how to make a command to spawn vehicles. Otherwise: Make a .map file with
  17. http://development.mtasa.com/index.php? ... WeaponFire http://development.mtasa.com/index.php? ... aponSwitch You might be able to make something out of events. Instead of timers, which I hate...
  18. I did need to think, but now I'm quite ashamed I did that... giveWeapon ( player, 30, 10000 ) giveWeapon ( player, 22, 10000 ) giveWeapon ( player, 27, 10000 ) giveWeapon ( player, 32, 10000 ) giveWeapon ( player, 16, 10000 ) giveWeapon ( player, 44, 10000 ) setPlayerArmor ( player, 100 ) setPlayerSkin ( player, 287 ) spawnPlayer ( player, 2725.2253417969, -2384.9313964844, 17.213558197021 ) I would actually think that while you're dead, and someone gives me weapons and then respawns me... That I don't have those weapons. Try spawnPlayer in front of the first giveWeapon.
  19. Awwwwww Quickly! Learn about tables! Tables are l33t FTW!
  20. Well it's better yes. What's even better is storing a factions weapons in a table and read it out instead of giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon,giveWeapon!
  21. Just some small pieces then. But do learn it yourself eh? function iDontKnowWhatKindOfFunctionNameYouWantSoLolIllMakeAVeryShortFunctionNameCuzYouDeserveItDoYouSee() if getPlayerTeam(source)==teamCops then giveWeapon(source,31,10000) ... end addEventHandler("onPlayerWasted",getRootElement(),iDontKnowWhatKindOfFunctionNameYouWantSoLolIllMakeAVeryShortFunctionNameCuzYouDeserveItDoYouSee) You know how to continue on your own. I know!
  22. You can make the check code yourself: Things you need to know: - Event for dieing (already gave you ) - getPlayerTeam(player) command - How to script
  23. Which means you need to add: <script src="script.lua"/> to your meta.xml
×
×
  • Create New...