majqq

Members
  • Content Count

    442
  • Joined

  • Last visited

Community Reputation

86 Popular

4 Followers

About majqq

  • Rank
    Hustler

Recent Profile Visitors

1,211 profile views
  1. 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?
  2. What's about security then? teaEncode, teaEncode + base64 looks like it uses some kind of obfuscation, or i am wrong?
  3. 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?
  4. Type /debugscript 3 Without that you can't go any further. It will display scripts warning/errors.
  5. I think this message is obvious? Update your server, or change min version in meta.xml which could result in warnings.
  6. This is waste of time, meanwhile developers can spend their time on fixing actual bugs, and improving current functions instead of adding new things.
  7. majqq

    [HELP] Tables

    No, create another one by yourself, it should looks same as facVehsTable but adjust it to your needs.
  8. majqq

    [HELP] Tables

    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)
  9. majqq

    [HELP] Tables

    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.
  10. majqq

    [HELP] Tables

    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)
  11. Wrong section. https://wiki.multitheftauto.com/wiki/SetPedStat https://wiki.multitheftauto.com/wiki/Weapon_skill_levels
  12. Change loop for sound to false, and save sound in variable and check it later?
  13. 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.
  14. Are you sure that you changed hour and minute in server-side part? Works for me... -- Serverside function timeFunction() local realtime = getRealTime() local hours = realtime.hour local minutes = realtime.minute -- here if hours == 21 and minutes == 54 then triggerClientEvent(getRootElement(), "onClientPlaySound", resourceRoot) end end setTimer(timeFunction, 1000, 0) -- 60 000 = 1 minute, 0 = infinite times -- Clientside function onClientPlaySound() --[[local x, y, z = 0, 0, 0 -- change your coordinates here local sound = playSound3D("daytime.mp3", x, y, z, true) setSoundMaxDistance(sound, 1000) setSoundPanningEnabled(sound, true)]] outputDebugString("test") end addEvent("onClientPlaySound", true) addEventHandler("onClientPlaySound", resourceRoot, onClientPlaySound)