-
Posts
1,028 -
Joined
-
Last visited
-
Days Won
1
Everything posted by ..:D&G:..
-
banPlayer(source, true, true, true, nil, "You were banned because of insulting words", 0) --This bans the player by IP, Username and Serial without a responsible player and permanently. I did this before, but it didn't work, imma try again.
-
Now.. I don't know why it ain't working, I don't seem to get any errors, and I tried to type "Word1" in all my server chats but nothing happens.. banWords = { "Word1", "Word2", } function checkChat(tMessage) for placeNumber, in ipairs stringData(banWords) do if (string.find(string.lower(tMessage), stringData) ~= nil) then local adGuy = getPlayerFromName( source ) local adGuySerial = getPlayerSerial( adGuy ) if ( adGuy ) then banPlayer( adGuySerial, source, "You were banned for beeing a..." ) end end end end addEventHandler("onPlayerChat", getRootElement(), checkChat)
-
I keep getting an error which says that 'in' is expected near '(' at this line: for placeNumber, stringData(banWords) do
-
I want to know if this is right: banWords = { "Word1", "Word2", } function checkChat(tMessage) for placeNumber, stringData(banWords) do if (string.find(string.lower(tMessage), stringData) ~= nil) then local adGuy = getPlayerFromName( source ) local adGuySerial = getPlayerSerial( adGuy ) if ( adGuy ) then addBan( adGuySerial, IP, seconds, source, "You were banned for beeing a cunt \"{SMILIES_PATH}/icon_razz.gif\" alt=\"\" title=\"Razz\" />" ) end end end end addEventHandler("onPlayerChat", getRootElement(), checkChat) From what I understood from the wiki, if I put IP in "addBan" it will ban the player IP along with "adGuySerial", which is the player serial, and if I put seconds, it will ban the player for 0 seconds (permanent ban). So, is it right?
-
This thing is kind of new to me, making tables and looping and getting what a player has said in chat... And what do you recommend me to do instead of a table? ----EDIT---- How do I get what the player is saying in the chat? I couldn't find a way to get what the player is saying in any chat like the custom ones for advertising or local/global chat.
-
Is this right? local banWords = "test come to...", "test come to 1..."; local strings = "test come to...", "test come to 1..."; function addBan(source) if (string.find(string.lower(strings), banWords) ~= nil) then banPlayer(source, getRootElement(), "You are banned due to ...") end addEventHandler( "onPlayerChat", getRootElement(), addBan )
-
How can I get the player that says the word? His name I mean..
-
Thanks for helping me Btw, what does this mean? -- s:P -->
-
Can you give me a MTA example of string.find please? I never seen it before
-
Hello, is there anyway I can do so if a player says a word (that I define) in any chat, he gets auto-permbanned?
-
Eși sigur că ai definit corespunzător .txd-ul și .dff-ul în meta?
-
txd = engineLoadTXD ( "caractere/MarioBalotelli.txd", 66) engineImportTXD ( txd, 66) engineLoadDFF ( "caractere/MarioBalotelli.dff", 66) engineReplaceModel (dff, 66) Nu ai definit linia care se numește "dff" încearcă asta. txd = engineLoadTXD ( "caractere/MarioBalotelli.txd") engineImportTXD ( txd, 66) dff = engineLoadDFF ( "caractere/MarioBalotelli.dff", 66) engineReplaceModel (dff, 66)
-
The human (and animal) brain is designed to learn, those who say that they "can't" learn (scripting), don't even try to learn and are just lazy and waiting for others to do their job. Why don't you start with: dxDrawImage
-
Yes I tried, and it still doesn't show nothing, not even an error...
-
Eh.. f*ck it, I am quiting this script, just doesn't want to work I wanted to reopen my old roleplay server but it seems that the world doesn't want me to reopen it Thanks for help anywa!
-
Doesn't work, and no errors... and tbh, I am not a very good scripter, but that function doesn't look right..
-
The outputChatBox doesn't show anymore... And no errors
-
How do I make that server-side?
-
Now I get "a nil value" when I use it in the other function... (The function uses onVehicleEnter event, before using findVehicleName, I used getVehicleName)
-
Hello, I recently made a resource that changes the default car names into real ones. Here is the code: function findVehicleName() for _, theVehicle in pairs( getElementsByType( "vehicle" ) ) do local car = getVehicleID( theVehicle ) if (car==603) then return "Shelby" end if (car==474) then return "Mercedes E500" end if (car==411) then return "Lamborghini Veneno" end end end -- return " (".. getVehicleName(source) ..") " --end I don't know why, when I put that "findVehicleName" into other function, it always gets me only the Infernus (Lamborghini Veneno) instead of the right name. For example if I do something like: outputChatBox("(( This is a " .. findVehicleName(theVehicle) .. ". ))", thePlayer, 255, 195, 14) It will say it is a Lamborghini Veneno(Infernus) even though the car is a Merit or Bullet etc.. Anyone knows why?
-
Hello, I joined FFS recently and I saw their lobby. I wanted to ask you guys, how can I do like them, when you hit F1, the camera is in a small square, not on the whole screen. The camera/view of the game would be in one of those boxes. How can I do that?
-
Pe orice server poti pune moduri, sti? Plus ca pe un server de RP nu prea merg moduri (doar daca vrei sa il faci RPDR = Roleplay de rahat/RPG ca si Mihailescu). Am fost timp de 3 ani pe MTA, dar m-am lasat. De ce? Din cauza jucatorilor (nu copiilor ca au peste 14 ani) care sunt vai de mama lor in viata reala, niste noobi de vorbesc fara noima, si care vin aici, intr-un loc virtual (sa faca ce stiu ei mai bine) unde ar trebuii sa fie spatiul nostru de recreere sau unde sa ne alungam plictiseala. Nu conteaza ce server faci, cat de frumos este, caci jucatorii nu o sa intre, daca intra, roagate sa nu il distruga. Am avut si eu server de Roleplay, am muncit mult la el, cu orele, si in cele din urma mi-a iesit ceva. Vor fi persoane care o sa spuna "Taci ma tu cu sv-ul tau de cacat, tu si mihailescu sunteti la fel", oricum se inseala, eu macar am incercat sa fac server de ROLEPLAY, si sa se vada ca este de ROLEPLAY, multi intra pe un server de RP pentru ca acolo pot face ce nu pot face in viata reala, dar cand vad regulile, o tulesc pe servere dea-l de Mihailescu/Raileanu etc... Eu iti recomand alt fel de server, unde nu trebuie sa bagi multa munca in el, si unul unde nu sunt prea multe reguli! Sau, lasa-te de MTA. P.S: Am scris mult fiind ca eram plictisit
-
A observat careva ca toti descopera forumul MTA si spun in mintea lor.. "Hm... am gasit forumul MTA-ului, poate pot si eu face un sv", si toti spun ca vor sa faca un server bine facut/scriptat si nu mai stiu eu cum. Asa zic toti! Dar este vre-un server bun? Da, sunt, dar goale, fiindca toti, inafara de 2-3 sunt ca niste copii care vor sa se joace cu masinutele si sa impuste (sa nu respecte regulile) sa faca ce nu pot ei face in viata reala. Multi spun "Vai dar eu nu sunt asa, eu vreau Roleplay si respect regulile", insa NIMENI dar NIMENI nu o face. Daca chiar vrei sa inveti scripting, de ce trebuie neaparat sa iti faci din prima un server de Roleplay, huh? Nu poti sa incepi cu alt ceva? Un Play, DM? Eu de exemplu am avut prima si prima oara un server de Play. Dar eh... Mai bine spune direct ca vrei un server de RP pentru ca acolo se "doneaza". In fine.. bafta (oare cum)...
-
Lol, 80 bucks?! I got them from a website for like 10 bucks -.- (Its 2 or 1 version old, but its easy to add stuff than have a compiled on, and than paying 80 bucks..) And I think you will eventually have to pay like 100 bucks for a new version
-
As I said, use guiGetScreenSize You will have to play around with the possitions, so you get the right possition of the gui