Jump to content

keymetaphore

Members
  • Posts

    175
  • Joined

  • Last visited

Everything posted by keymetaphore

  1. Thank you, I just can't believe that I didn't try that. Lock please. @ccw
  2. Did it, with the whole function. Attempt to concetanate (might be wrong) local targetPlayer(a userdata value) function getPlayerFromPartialName(name) local name = name and name:gsub("#%x%x%x%x%x%x", ""):lower() or nil if name then for _, player in ipairs(getElementsByType("player")) do local name_ = getPlayerName(player):gsub("#%x%x%x%x%x%x", ""):lower() if name_:find(name, 1, true) then return player end end end end function issueJail(source, command, targetPlayer, reason) if targetPlayer and reason then local targetPlayer = getPlayerFromPartialName(targetPlayer) outputChatBox("Spēlētājs " ..targetPlayer.." ir saņēmis brīdinājumu par "..reason..".", source, 255,0, 0) outputChatBox("Jūs esat RP pārkāpuma ierakstu no administratora " .. source .. ".", targetPlayer, 255, 0, 0) outputChatBox("Sakrājot vairākus šādus brīdinājumus, jūs saņemsiet liegumu no servera.", targetPlayer, 255, 0, 0) outputChatBox("Jūsu pārkāpums: "..reason..".", targetPlayer, 255, 0, 0) outputChatBox("Vai brīdinājums ir izsniegts nepatiesi? Ziņo forumā!", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) else outputChatBox("Sintakse: /"..command.. " [Daļa no vārda/ID] [Iemesls]", source, 255, 194, 14) return false end end addCommandHandler("pwarn", issueJail) rip, still need help
  3. Problem is serverside, and stop stealing c;.
  4. Got a warning - Bad argument @ 'getPlayerName'[Expected element at argument 1, got string 'James'] ( it's a full name ) function issueJail(source, command, targetPlayer, reason) if targetPlayer and reason then local targetPlayer = getPlayerName(targetPlayer) outputChatBox("Spēlētājs " ..targetPlayer.." ir saņēmis brīdinājumu par "..reason..".", source, 255,0, 0) outputChatBox("Jūs esat RP pārkāpuma ierakstu no administratora " .. source .. ".", targetPlayer, 255, 0, 0) outputChatBox("Sakrājot vairākus šādus brīdinājumus, jūs saņemsiet liegumu no servera.", targetPlayer, 255, 0, 0) outputChatBox("Jūsu pārkāpums: "..reason..".", targetPlayer, 255, 0, 0) outputChatBox("Vai brīdinājums ir izsniegts nepatiesi? Ziņo forumā!", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) else outputChatBox("Sintakse: /"..command.. " [Daļa no vārda/ID] [Iemesls]", source, 255, 194, 14) return false end end addCommandHandler("pwarn", issueJail)
  5. player playerSource, string commandName, [string arg1, string arg2, ...] function issueJail(triggerer - source, commandname - command, arg1 -targetPlayer, arg2 -reason)
  6. function issueJail(source, command, targetPlayer, reason) local source = getPlayerFromName(source) local targetPlayer = getPlayerFromName(targetPlayer) if targetPlayer and reason then outputChatBox("Spēlētājs " ..targetPlayer.." ir saņēmis brīdinājumu par "..reason..".", source, 255,0, 0) outputChatBox("Jūs esat RP pārkāpuma ierakstu no administratora " .. source .. ".", targetPlayer, 255, 0, 0) outputChatBox("Sakrājot vairākus šādus brīdinājumus, jūs saņemsiet liegumu no servera.", targetPlayer, 255, 0, 0) outputChatBox("Jūsu pārkāpums: "..reason..".", targetPlayer, 255, 0, 0) outputChatBox("Vai brīdinājums ir izsniegts nepatiesi? Ziņo forumā!", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) outputChatBox("", targetPlayer, 255, 0, 0) else outputChatBox("Sintakse: /"..command.. " [Daļa no vārda/ID] [Iemesls]", source, 255, 194, 14) return false end end addCommandHandler("pwarn", issueJail) So, I wrote this code, and I keep getting this error - Attempt to concatenate local ' targetPlayer' (a userdata value) I tried to use it with getPlayerName() too, but it didn't work. Any hints?
  7. Ale. I've got a pretty small problem, but sometimes it's real annoying. It's where you see the version, I couldn't take a screenshot ( ), it says that 1.3.5 is the newest version. 1.) Reinstalled MTA with deleting all files 2.) Changed languages 1337 times 3.) Bricked my hard drive, had to reinstall new OS STILL THE SAME Please help?
  8. keymetaphore

    help

    Why are you actually using getElementType()? Usually there are no other elements that call "onPlayerWasted".
  9. keymetaphore

    help

    Is your code clientside or serverside? Also - /debugscript 3?
  10. Totally suppose creation of Latvian section. That would be nice, and I'm sure pretty much people would be there.
  11. Hello. I'm trying to make a icon under nametag, like that in screenshot. I'm learning lua. I want to make a lowrp icon, so admins can set it to new players, who learn rp. Can someone help? http://i.imgur.com/XldRawZ.png - ss P.S if its wrong place, please move it
  12. keymetaphore

    Mysql.

    Hey! I've got a problem, with mySQL. When i'm on PC, all runs, I can connect to sql. SQL is on my MTA hosting. When i'm on host, it doesn't connect mysql, but info is the same! I really don't understand what's going on. Host : Blackpulse, also recommended at mtasa.com On host there is windows x64.
  13. keymetaphore

    Version.

    Hey guys. I'm really new to MTA server's, and I am learning how to make an MTA server. OK, I have a GM that is similar to owl. I don't know how to change version. ( I have 1.4, i need 1.5 ) I tried changing version in config, at down, but it doesn't worked. Please help someone.
×
×
  • Create New...