Jump to content

TorNix~|nR

Members
  • Posts

    503
  • Joined

  • Last visited

Everything posted by TorNix~|nR

  1. @SpecT, It's working thanks, but a little problem, when I make the command, the player should logout and login, how to change that into an immediately change?
  2. setAccountData(account,"kills", tonumber(amount)) end I got Bad argument @ 'setAccountData' [Expected account at argument 1, got string '...'] how to check the account?
  3. TorNix~|nR

    Command

    Hello guys, I want some help with this command code please, it won't work like this: /kills 'accountname' 'amount' function isPlayerInACL(thePlayer, acl) local account = getPlayerAccount(thePlayer) if (account) and not (isGuestAccount(account)) then local aclGroup = aclGetGroup(acl) if (aclGroup) then local accountName = getAccountName(account) return isObjectInACLGroup("user."..accountName, aclGroup) end end return false end addCommandHandler("kills", function (thePlayer, _, account, amount) if (isPlayerInACL(thePlayer, "Admin")) and (tonumber(amount)) then local account = getPlayerAccount(player) local player = getAccountName(account) if (player) then if (setElementData(player, "kills", tonumber(amount))) then if (account) then setAccountData(account,"kills", tonumber(amount)) end outputChatBox("done", thePlayer, 0, 0, 255) else outputChatBox("failed", thePlayer, 255, 0, 0) end else outputChatBox("account not found", thePlayer, 255, 0, 0) end end end)
  4. Hello guys I'm getting kicked from any server in MTA, even my server I get this problem [CD48] kicked (AC #4 wxHexEditor) how to solve this?
  5. Sorry, I didn't know about the reply reactions It's working perfectly fine, I can't thank you enough
  6. I'm sorry again but I didn't understand how I changed every element to button, I tried panel too but it's the same problem
  7. I used this local languageSwitch = {} local defaultLanguage = "Spanish" function guiSetLangaugeSupport (element, languages) languageSwitch[#languageSwitch + 1] = {element = element, languages = languages} guiSetText(element, languages[defaultLanguage] or guiGetText(element)) return element end function guiSetLanguageSwitch (language) for i=1, #languageSwitch do local switchData = languageSwitch[i] guiSetText(switchData.languages[language] or switchData.langauges[defaultLanguage] or select(2, next(switchData.languages)) or guiGetText(switchData.element)) -----------HEREAGAIN end end local button = guiSetLangaugeSupport(guiCreateRadioButton(17, 27, 205, 21, "Police", false, panel), {Spanish = "policía", English = "Police"}) addEventHandler( "onClientResourceStart", getRootElement(), function () guiSetLanguageSwitch (getElementData(localPlayer, "Language")) end ); and got the problem in the same line guiSetText [Expected gui-element at argument 1, got string 'Police']
  8. I used this local languageSwitch = {} local defaultLanguage = "English" function guiSetLangaugeSupport (element, languages) languageSwitch[#languageSwitch + 1] = {element = element, languages = languages} guiSetText(element, languages[defaultLanguage] or guiGetText(element)) return element end function guiSetLanguageSwitch (language) for i=1, #languageSwitch do local switchData = languageSwitch[i] guiSetText(switchData.element, switchData[language] or switchData[defaultLanguage] or select(2, next(switchData)) or guiGetText(switchData.element)) -------THE PROBLEM end end local button = guiSetLangaugeSupport(guiCreateRadioButton(17, 27, 205, 21, "Police", false, panel), {Spanish = "policía", English = "Police"}) addEventHandler( "onClientResourceStart", getRootElement( ), function () guiSetLanguageSwitch (getElementData(localPlayer, "Language")) end ); but I got this problem Bad argument @'guiSetText' [Expected string at argument 2, got table]
  9. local languageSwitch = {} local defaultLanguage = "English" function guiSetLangaugeSupport (element, languages) languageSwitch[#languageSwitch + 1] = {element = element, languages = languages} guiSetText(element, languages[defaultLanguage] or guiGetText(element)) return element end function guiSetLanguageSwitch (language) for i=1, #languageSwitch do local switchData = languageSwitch[i] guiSetText(switchData.element, switchData[language] or switchData[defaultLanguage] or select(2, next(switchData)) or guiGetText(switchData.element)) end end guiSetLanguageSwitch (getElementData(localPlayer, "Language")) local button = guiSetLangaugeSupport(guiCreateRadioButton(17, 27, 205, 21, "Police", false, panel), {Spanish = "policía", English = "Police"}) @IIYAMA I'm sorry but I'm a complete failure
  10. I'm sorry if it's confusing, I mean For example {en = "Police", es = "Policía"}) I want the "es" to get (getElementData(localPlayer, "Language") == "Spanish") and the "en" to get (getElementData(localPlayer, "Language") == "English")
  11. Thank you so much, I just tested it, the defaultLanguage is working fine but I want to know how to get the language I have Like I told you I am using this if (getElementData(localPlayer, "Language") == "English") if (getElementData(localPlayer, "Language") == "Spanish") I made this when the player join, he select the language (English or Spanish) if you understand what I mean
  12. TorNix~|nR

    Language

    Hello guys, I wanted to ask if I can set this languages in buttons if (getElementData(localPlayer, "Language") == "English") if (getElementData(localPlayer, "Language") == "Spanish") this is the button guiCreateButton(0, 0, 0, 0, "Police", false, panel) I'm wondering how to change the button from English to Spanish, any ideas please? I mean changing that "Police" to "Policía" (Spanish Language).
  13. It's finally working, thank you so much.
  14. I tried making a timer but didn't know how to make it I tried this but it's the same, stuck at the same remaining time local jailtime = jailLeftTimer[source] if (jailtime) and (isTimer(jailtime)) then local remaining = getTimerDetails(jailtime) local display = textCreateDisplay() local text = textCreateTextItem("", 0.15, 0.53, "high", 150, 0, 0, 255, 2, "right", "bottom") textDisplayAddText(display, text) textDisplayAddObserver(display, source) textItemSetText(text, math.floor(remaining/1000)) end
  15. Hello guys, I have a problem, I have this jail system and I added textCreateTextItem to start counting the left jail time but it didn't work local jailtime = jailLeftTimer[thePlayer] local remaining = getTimerDetails(jailtime) local display = textCreateDisplay () if (jailtime) and (isTimer(jailtime)) then local text = textCreateTextItem("["..math.floor(remaining/1000).."]", 0.15, 0.53, "high", 150, 0, 0, 255, 2, "right", "bottom") textDisplayAddText(display, text) textDisplayAddObserver(display, thePlayer) end I made a command that works fine but only with command addCommandHandler( "jailtime", function (thePlayer) local jailtime = jailLeftTimer[thePlayer] if (jailtime) and (isTimer(jailtime)) then local remaining = getTimerDetails(jailtime) outputChatBox("You have ["..math.floor(remaining/1000).."] left for your jail time.", thePlayer, 0, 255, 0, true) end end) I want to make the textCreateTextItem work, help please by the way, the textCreateTextItem shows only the first left seconds example [200] and it stucks there and never change
  16. Hello guys, I don't know where the problem is in this code I'm trying to make the button only for the ACL 'Admin' The messages 'fail' and 'done' in server-side are working but the panel appears anyway client-side addEvent("trigger", true) addEventHandler("onClientGUIClick", getRootElement(), function() if (source == button[1]) then triggerServerEvent("trigger", localPlayer) guiSetVisible(window[4], true) guiBringToFront(window[4]) end) server-side addEvent("trigger", true) function Test(plr) if (not isElement(plr)) then return end if isObjectInACLGroup("user."..getAccountName(getPlayerAccount(source)), aclGetGroup("Admin")) then triggerClientEvent(plr, "trigger", plr) outputChatBox("done") else return outputChatBox("fail") end end end addEventHandler("trigger", root, Test) any help please?
  17. THE SERVER IS BACK AGAIN! Hello everyone, I wanted to introduce my server it's created since 2014 but I closed it in March 2020, now it's back! About Los Santos Zombie RPG Gamemode, the server has been going on for a few years, it's like a real life apocalypse experience, if you are new in the server? you are going to spawn as citizen. in order to become pro and get to Police and Military Forces.. etc you have to go work and kill zombies / bosses.. etc I got the idea of combining zombie and rpg together, and here's the idea I got. Features 3 BOSSES to kill and receive a lot of money. Jobs like Miner, Agricultor.. etc with receiving a lot of money too. Police Officers whom can arrest players and view their wanted level. (requirements needed to join) Military Forces whom can arrest players too with an easier way. (requirements needed to join) Criminals whom can sell drugs to players and got many features... etc (requirements needed to join) Creating unofficial clans with $500,000, to make them official more informations in the server. Briefcase Bag giving money and armor. Vehicles System. Automod System meaning a private car that only one or two players can drive it, it's damage proof and has a private custom panel. Skinmod System. Jail System. ( Police and Military Forces can arrest wanted players, and when the player gets 6 wanted levels, he will automatically be on his way to jail ) Weather System changes with time and you can press F5 to view the current weather and the coming weather. VIP System. there's a lot more... Some little things yeah enough with that, there's more in the server. Server Informations IP: mtasa://92.222.217.127:22003 More informations in the server, or you can send me a pm.
  18. Hello guys, I wanted to know how to make this button be visible or open only for specific ACL button = guiCreateButton(370, 525, 80, 30, "Button", false, tab) if (source == button) then -- opens punishment window guiSetVisible(window, true) guiBringToFront(window) Help please
  19. @Bence2004, what do you mean?
  20. It's working, thank you so much
  21. I'm using exports of topbar (the script) exports.topbar:dm ( "Use #ff0000/changepw#ffffff to change your account password.", root, 0, 245, 82, true )
  22. Hello guys, I have a little problem that I want to solve I'm using topbar script with showing texts on the console I want to remove the hex colors like #ff0000, but I couldn't do it --[[ Display a DX topbar message ]]-- function dm(text, r,g,b, col, bell) -- Insert message local tick = getTickCount() if text == last_msg then return end if not col then col = false end if bell then playSoundFrontEnd(11) end table.insert(messages, {text, true, tick + display_time_ms, 170, r,g,b, col }) outputConsole("[TOPBAR] "..text) --this is the one last_msg = text setTimer(function() last_msg = "" end, 10000, 1) -- Play a message notification sound --playSoundFrontEnd(11) please any help?
  23. Hello guys, I wanted to ask where is the problem in this? I'm getting debug expected argument... how can I fix it? local veh = (getElementType(source) == "vehicle") if veh and isVehicleDamageProof(veh) == false then help please!
×
×
  • Create New...