Jump to content

srslyyyy

Scripting Moderators
  • Posts

    635
  • Joined

  • Days Won

    8

Everything posted by srslyyyy

  1. https://wiki.multitheftauto.com/wiki/TeaEncode / https://wiki.multitheftauto.com/wiki/EncodeString
  2. I know that has nothing to do with that, but calling unpack every frame, it is heavy function. You might simply replace it with [], since you know how much data will be returned.
  3. Hey. Would you like to play on one of uncommon DayZ projects? If so, then Re-Zet is your best choice Features: - Multilingual - Dynamic events - mutants/cars - NPC's - Weapon quality - Crafting - Winter and summer seasons - Hidden locations And much more IP: rz.nonstopz.com Site: en.nonstopz.com Check out trailer of server:
  4. No, this way you wouldn't learn anything.
  5. Without debugscript 3 you can't go any further. Type /debugscript 3 to check for warnings/errors. There's no playerSource, replace it with source.
  6. Wrong parameters in function - read carefully - https://wiki.multitheftauto.com/wiki/OnPlayerLogin source is your player who logged in, replace thePlayer with previous_account and command with current_account Then on line 3, you need to pass current_account. Good luck.
  7. As you can see - didn't asked, i also never used them. But as first i thought this is "replacement" for timers. About question - maybe because there's no need to check for ban timeleft if there's no bans at all? If i am wrong, please correct me
  8. Thanks for answer. I'm familiar with JSON, so i will use it for sure. About timers - ok, that is something similar what i wanted to do. Timer on server-side, which will check for endtime. Wasn't sure, since i'm rarely using timers, the only exception is buffer for triggers.
  9. Hey. As title says, which will be better for my case? I'm planning to create a custom admin panel for myself. Will need it for temporary vips and bans. As far i remember admin panel was using coroutines for this stuff. Any advices?
  10. Still not sure if i should stay with teaEncode or replace it with encodeString, do you know maybe if there any cons if we gonna compare encodeString to teaEncode, what about protection, should i worry about that, if am gonna replace it?
  11. What's about security then? teaEncode, teaEncode + base64 looks like it uses some kind of obfuscation, or i am wrong?
  12. Hi. I have some question about those encoding functions. I use teaEncode with base64 for encoding my files (dff, txd, col), the problem is the size of file. Wiki suggests, that i should use encodeString instead. - What's difference between teaEncode and encodeString? - What does base64? - Does encodeString is less secure than teaEncode?
  13. Type /debugscript 3 Without that you can't go any further. It will display scripts warning/errors.
  14. I think this message is obvious? Update your server, or change min version in meta.xml which could result in warnings.
  15. This is waste of time, meanwhile developers can spend their time on fixing actual bugs, and improving current functions instead of adding new things.
  16. No, create another one by yourself, it should looks same as facVehsTable but adjust it to your needs.
  17. Create other table for it, you have an example how you can do it. Besides this should look like this: addCommandHandler("rv", function(player, cmd) local faction = getElementData(player, "faction") local vehicles = getElementsByType("vehicle") for i = 1, #vehicles do local vehicle = vehicles[i] if vehicle then local vehid = getElementID(vehicle) if facVehsTable[vehid][faction] then respawnVehicle(vehicle) end end end end end)
  18. Uncomment this: --local faction = getElementData(player, "faction") - why do you need this? i commented this because it's never used So it will look like: local faction = getElementData(player, "faction") And move it under or above: local vehicles = getElementsByType("vehicle") To not necessarily call function x times in loop. After that you need to index: [faction] On line 10: if facVehsTable[vehid] then This will use data from facVehsTable. Goodluck.
  19. Use outputDebugString to check if code actually runs. Add it before condition, and inside condition. Maybe you didn't set spawn coordinates - not sure. https://wiki.multitheftauto.com/wiki/SetVehicleRespawnPosition Also use int loop not ipairs, ipairs isn't that effective. addCommandHandler("rv", function(player, cmd) local vehicles = getElementsByType("vehicle") for i = 1, #vehicles do local vehicle = vehicles[i] if vehicle then local vehid = getElementID(vehicle) --local faction = getElementData(player, "faction") - why do you need this? i commented this because it's never used if facVehsTable[vehid] then respawnVehicle(vehicle) end end end end end)
  20. Wrong section. https://wiki.multitheftauto.com/wiki/SetPedStat https://wiki.multitheftauto.com/wiki/Weapon_skill_levels
  21. Change loop for sound to false, and save sound in variable and check it later?
  22. Change if hours == 06 and minutes == 30 then to if hours == 6 and minutes == 30 then Besides, loop is only executed only when client resource start. Use setTimer, but i just want to say, that it will take time from player's PC. This function gets the server or client (if used client sided it returns time as set on client's computer) real time and returns it in a table. If you want to get the in-game time (shown on GTA's clock) use getTime.
×
×
  • Create New...