Jump to content

Smart.

Members
  • Posts

    340
  • Joined

  • Last visited

Everything posted by Smart.

  1. Surely it would be better to check account name rather than a players name?
  2. In the server lua, I feel stupid now since I can't remember if I added these by myself or if they where included from the beginning, anyway these 2 functions can be used to get turf color and chat color, if they not in the system already it's easy to add. function getGroupChatColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][3]) return color[1], color[2], color[3] end function getGroupTurfColor(group) if (not groupTable[group]) then return 255, 255, 255 end local color = fromJSON(groupTable[group][6]) return color[1], color[2], color[3] end And secondly, there is a security bug in the function attemptMakeGroup(), it's explained here: http://mta.albonius.com/index.php?topic=457.0, and a solution is included as well. I recommend you all to see it if you want to prevent special characters from being used to steal existing groups. Remember to backup your database first, and it's already commonly exploited by many players. Tjenare, They were included.
  3. Take a look at this one: https://community.multitheftauto.com/index.php?p=resources&s=details&id=9056. Specially made to work with this group system and open source as well. Just remember to verify that the exported functions to get turf color and team color are in the meta.xml file of the group system. <export function="getGroupChatColor" type="server"/> <export function="getGroupTurfColor" type="server"/> It's currently in an early beta state and has only been quickly scripted and tested so there are some configuration to do to make it work, like a few variable names and other exports, but except for that it seems to be pretty appreciated after all. For some reason the whole inspiration for the turf system came from this group system so a special thanks to Smart for the group system. I have a question about your turf system.. it works but when i create a turf and i capture it, then i restart the resource the turf gets created but the owner is set to 'none' Ask questions about that resource on it's own page, this thread is for the group system only.
  4. SQL is the better option
  5. You can make your own progress bar with dxDrawText & dxDrawRectangle
  6. Group level? There's group ranks already where you can modify the rank permissions? I'm also planning on improving this system or writing some of the missing functions such as making the group logs or perhaps something else you'd like to see?
  7. removed Knock yourself out, some of them will be bugged but you can use some. Set up a MySQL server with the following information if you don't want to change the MySQL information in the scripts by yourself: removed
  8. "Made by Wesley Willems", sure http://luiszuno.com/blog/downloads/nova-html-template/ All the rights are originally reserved by the rightful author but yet on your website you claim all rights lol
  9. I have no clue, haven't played MTA in ages. r,g b = getGroupChatColor(groupString) Thanks for the positive feedback! is the argument the group name? yep
  10. I have no clue, haven't played MTA in ages. r,g b = getGroupChatColor(groupString) Thanks for the positive feedback!
  11. Smart.

    Help me

    If people post the code but don't explain what he's doing wrong how will he learn something? onPlayerJoin doesn't have any parameters, source is already the player argument however, you including it overrides it to nil. It's all on the wiki.
  12. With that you're calling the function but not passing the player argument, try: function polices ( attacker, attackerweapon, bodypart, loss ) if attacker and getElementType(attacker) == "player" then theTeam = getPlayerTeam ( attacker ) theWL = getPlayerWantedLevel ( source ) money = theWL * 2.5 if (attackerweapon == 3 or attackerweapon == 23) and (loss > 2 ) and (theWL > 0) then if getTeamName( theTeam ) == "Police" or getTeamName( theTeam ) == "United States Army" or getTeamName( theTeam ) == "Sheriff Academy" then setElementPosition (source, 4076.3999023438, -1788.5, 3.511967, true) theName = getPlayerName ( source ) theCop = getPlayerName ( attacker ) outputChatBox( "*INFO* "..theName.." has been jailed and arrested by "..theCop.."", source, 255, 255, 0 ) local playeraccount = getPlayerAccount ( attacker ) givePlayerMoney (attacker, money) setElementData(source, "isJailed", "true") setTimer ( newEvent, 1000, 1, source) end end end end addEventHandler ("onPlayerDamage", getRootElement(), polices) function newEvent(player) local source = source or player if (not source or not isElement(source)) then outputDebugString("Source is false or is not an element") return end theName = getPlayerName(source) if getElementData(source, "isJailed") == "true" then setElementData(source, "isJailed", "false") setPlayerWantedLevel(source, 0) end end addEvent("releasePlayer", true) addEventHandler("releasePlayer", getRootElement(), newEvent)
  13. Smart.

    Spawn

    https://wiki.multitheftauto.com/wiki/OnPedWasted is only triggered when a ped die, I think you want https://wiki.multitheftauto.com/wiki/OnPlayerWasted local spawnLocations = { {331.06286621094,1855.9083251953,7.828125}, {216.45199584961,1822.6893310547,6.4140625}, {211.66558837891,1810.6231689453,21.8671875} } local respawnPlayer = function() local chosenSpawnLocation = math.random(1,#spawnLocations) spawnPlayer(source,spawnLocations[chosenSpawnLocation][1],spawnLocations[chosenSpawnLocation][2],spawnLocations[chosenSpawnLocation][3]) end addEventHandler("onPlayerWasted",root,respawnPlayer)
  14. It's easier to keep track of accountData if you specify what resource sets the data.
  15. I'd do something like this when you enter the marker (when you finish the job/mission) local amount = tonumber(getAccountData(getPlayerAccount(player), "resource.flights")) or 0 local newAmount = amount + 1 setAccountData(getPlayerAccount(player), "resource.flights", newAmount) if (newAmount) >= 500 then outputChatBox("You've been promoted", player) elseif (newAmount >= 1000) then outputChatBox("Promoted once again", player) end And then for the increased payment you can do something like this: local amount = tonumber(getAccountData(getPlayerAccount(player), "resource.flights")) or 0 local payment = 25 * amount --if the player has 500 flights he will get 12500 givePlayerMoney(player, payment)
  16. Hello, I class myself as an experienced and good scripter and if you want your script to be connected with a website (showing stats or something else) I can do that too as I've got some PHP knowledge, so I shouldn't having any issues with not being able to make what you want and it wont be expensive. Prices will obviously wary depending on what script you want made, the bigger script the more it will cost. If you are interested, please send me a PM. Past Work: Developer at CIT. Creator of IGC (although not something I'm proud of lol) Some resources I've made and released (got more resources I can show if you still question my creditability): A group system - https://community.multitheftauto.com/index.php?p= ... ls&id=8291 Job system (made for RPG servers) - https://community.multitheftauto.com/index.php?p= ... ls&id=6016 Vehicle Spawner (also made for RPG) - https://community.multitheftauto.com/index.php?p= ... ls&id=6039 Donate/VIP system - https://community.multitheftauto.com/index.php?p= ... ls&id=5780
  17. Are you sure? I've never had any problems with it
  18. Or one of the 1 billion free website hosting sites (e.g: http://www.000webhost.com)
  19. no Are you willing to pay for a script like this?
  20. UPDATE: Simple to use VIP/Donate system, it allows you to add an account into a database which updates every hour. To add an account simply use: /addvip accountName hours (you can only use command if you have permission to ban people, use 0 as hours for permanent VIP) To remove an account that is in-game use: /removevip accountName (requires kick player permission) To view a list of all VIPs: /showvip (requires kick player permission) To see how much VIP time you have left: /viptime Export function which you can use to see if people have VIP: exports.vip_system:isPlayerDonator(player) - returns amount of hours or false if not in database. Download: https://community.multitheftauto.com/index.php?p= ... ls&id=5780
  21. I've fixed all errors and it should now work perfectly. No it doesn't require ACL rights there was a few errors with the resource that I've fixed.
  22. Smart.

    Need Scripter

    If you're still looking for a scripter let me know, but 50 euros for a whole game mode is quite low
  23. Doubt anyone will do it for free
  24. Completely off topic but haven't been writing lua in couple of months lol
  25. True, but it would be a waste of your memory since you only use it for counting. What if he would like to use the previous count at any other time and I hardly doubt a variable containing max 3 integers will do anything to the memory and if it does you should seriously consider a new host.
×
×
  • Create New...