Jump to content

Spajk

Members
  • Posts

    285
  • Joined

  • Last visited

Everything posted by Spajk

  1. Keep thinking like that and you'll surely end up on the top.
  2. That makes no sense, et-win.
  3. For a server to be best of the best you first need to have a gamemode different than others. So, what I hope is that the developer will host the only server with this gamemode instead of releasing it to public.
  4. The downside is having something like current Roleplay and DayZ scene. ( Shitload of servers, no players )
  5. Great job, I hope you don't release this to public.
  6. Spajk

    1.4 Beta Release

    Is this guy serious ?
  7. You could try wth setPedControlState. setPedControlState ( ped, "fire", true) setTimer(setPedControlState, 1000, 1, ped, "fire", false)
  8. I think that this is GTA:SA limit. But why do you need so many objects? 65365 is quite a lot.
  9. https://www.mediafire.com/?apcpl89q2aw22rw This is a little script for getting server stats, extracted right from the GameQ. To use it simply include it and use the function "scan_server($ip, $port)". Note: For port, use the ASE port number.
  10. Spajk

    RP Projekt!

    Uh, po onome sto sam cuo, RP serveri tesko pocinju jer cim budu malo poznatiji, odredjeni serveri pocnu da ih DDoS-uju.
  11. Spajk

    Pomoc oko scripte

    Odgovorio sam ti tamo.
  12. Spajk

    Question

    local stats = {73, 75, 71, 77, 78} for _, stat in ipairs(stats) do setPedStat(source, stat, 1000) end This is why, stat ID 73 is "73: WEAPONTYPE_SAWNOFF_SHOTGUN_SKILL" You are setting player's skill to "pro" by, but in the code below you are only changing weapon property at "poor". Simple fix is to include the following line in the code: setWeaponProperty(26, "pro", "damage", 30) Also, weapon properties don't need to be set again on every spawn.
  13. SMF should use the following algorithm for password hashing: $hash = sha1(strtolower($member_name) . $password); Try to port that to MTA. EDIT: I wasn't really busy so I decided to do it myself. function generateSMFHash(user, pass) return sha1(string.lower(user)..pass) end In order for it to work you should install the SHA module by mabako: https://wiki.multitheftauto.com/wiki/Modules/SHA
  14. I think I know enough of C++ to build something like that. But. Today I did some "testing" and what I encountered is that the calculations don't seem to be right. Sometimes, I hear the sounds very loud, I move the camera just a bit and it's almost silent.
  15. I don't see how it is confusing, it's simple logic.
  16. But I find it illogical to be like that. The sound's volume should depend on player's position, not camera position.
  17. Spajk

    Big Problem

    It would be better if you used newLevel argument from onPlayerChangeLevel. function sPlayerLevel() local account = getPlayerAccount(source) local playerLevel = 0 if not (isGuestAccount(account)) then local level = exports.exp_system:getAccountLevel(account) if (level ~= nil) and (level ~= false) then playerLevel = level end end setElementData(source, "Level", playerLevel) end function sPlayerLevel2(old, new) setElementData(source, "Level", new) end addEvent("onPlayerChangeLevel", true) addEvent("onPlayerLevelUP", true) addEventHandler("onPlayerChangeLevel", getRootElement(), sPlayerLevel2) addEventHandler("onPlayerLevelUP", getRootElement(), sPlayerLevel2) addEventHandler("onPlayerLogin", getRootElement(), sPlayerLevel) Avoid using timers as much as possible. They are very performance-intensive.
  18. -- create a blue blip local blip = createBlip ( x, y, z 0, 2, 5, 120, 250) local color = false function checkColor() if color then setBlipColor(blip, 5, 120, 250) else setBlipColor(blip, 255, 0, 0) end color = not color end setTimer ( checkColor, 1500, 0 )
  19. Spajk

    Big Problem

    The scoreboard uses the data from element data. If you are using Castillo's exp system, which I think you are using, then you can see this page: https://wiki.multitheftauto.com/wiki/Re ... Exp_system Look at the bottom and you will see the events it adds. As for the problem, I am not sure when is each of these events triggered as there's onPlayerChangeLevel and onPlayerLevelUP. My guess is that both of them need to be hooked. Try this one: exports.scoreboard:addScoreboardColumn('Level') addEventHandler("onPlayerLogin", root, function () local account = getPlayerAccount(source) local playerLevel = 0 if(not isGuestAccount(account))then local level = exports.exp_system:getAccountLevel(account) if(level)then playerLevel = level end end setElementData(source, "Level", playerLevel) end) addEventHandler("onPlayerChangeLevel", root, function(old, new) setElementData(source, "Level", new) end) addEventHandler("onPlayerLevelUP", root, function(old, new) setElementData(source, "Level", new) end)
  20. local hospitalPositions = { --{name, x, y, z, r, cx, cy, cz} {"Los Santos 1", 1183.3, -1323, 13.58, 0, 1183.3, -1323, 18}, {"Los Santos 2", 2034.1, -1404.73, 17.25, 0, 2034.1, -1404.73, 22}, {"Montgomery", 1371.83, 405.94, 19.76, 0, 1371.83, 405.94, 25}, {"Blueberry", 207.5, -62.7, 1.6, 0, 207.5, -62.7, 7} }; addEventHandler("onPlayerWasted", root, function() local theSkin = getPedSkin(thePlayer) local theTeam = getPlayerTeam(thePlayer) local px, py, pz = getElementPosition(source) local nearest = 1 for k, v in pairs(hospitalPositions) do if(getDistanceBetweenPoints3D(v[2], v[3], v[4], px, py, pz) < getDistanceBetweenPoints3D(hospitalPositions[nearest][2], hospitalPositions[nearest][3], hospitalPositions[nearest][4], px, py, pz))then nearest = k end end setCameraMatrix(source, hospitalPositions[nearest][6], hospitalPositions[nearest][7], hospitalPositions[nearest][8], hospitalPositions[nearest][2], hospitalPositions[nearest][3], hospitalPositions[nearest][4]) setTimer( function() spawnPlayer(source, hospitalPositions[nearest][2], hospitalPositions[nearest][3], hospitalPositions[nearest][4], hospitalPositions[nearest][5], theSkin, 0, 0, theTeam) setCameraTarget(source) end, 5000, 1) end)
  21. Spajk

    Big Problem

    Try it out: exports.scoreboard:addScoreboardColumn('Level') addEventHandler("onPlayerLogin", root, function () local account = getPlayerAccount(source) local playerLevel = 0 if(not isGuestAccount(account))then local level = exports.exp_system:getAccountLevel(account) if(level)then playerLevel = level end end setElementData(source, "Level", playerLevel) end) addEventHandler("onPlayerChangeLevel", root, function(old, new) setElementData(source, "Level", new) end)
×
×
  • Create New...