-
Posts
636 -
Joined
-
Last visited
Everything posted by 'LinKin
-
Yes, I mean that Arezu.. Just like string.find
-
Hello, I want to select the rows from a certain table that contain a string in one of its columns. More explained: Serial___________Nicknames 182739817298____Link, test, stuff, bla 180009817298____asd, zaa, dada, zimbe 180000017298____ee, , hh, bla How can I select the rows that contain "bla" in the Nicknames column? I'm using MySQL, and the Nicknames column is type TEXT Thanks
-
Okay. Anyway I've used a table since I'd like to display how many nicknames a player has had. Thank you
-
I was just trying and I found another possible solution: addEventHandler("onPlayerChangeNick", root, function (oldNick, newNick) setTimer(function() if wasEventCancelled() then outputChatBox("Was Cancelled!") return end end, 500, 1) end) It works! But guys I've one question, how does the script know that I'm ONLY asking if the onPlayerChangeNick event was cancelled? Is it because it's inside of the same event?
-
Hello, Is there any limit when setting a player's element data when working with strings? I mean something like this: setElementData(thePlayer, "myDataKey" longAssString) The string can be quite long! It's storing the nicknames that a player has used. On average, 50 nicknames would be 650 characters long!
-
Hello, I want to make a validation so that if a character that is NOT accepted by MTA as a possible player's nick part it outputs an error. So like this: if theNick:find("%W") then In that case, it will detect if there are non-alphanumerical characters present. But how could I make an exeption so that it accepts some non-alphanumerical characters that are allowed by MTA? For example a player can set his nick to |SW|'~(L)inKin. and MTA will accept it as the player's nick, but it does contain non-alphanumerical characters. Accepted symbols are: \|@#~!"$%&/()[]=?+*-.' However player's nick cannot contain these symbols: º ñ ç · and some others So which pattern for string.find should I use in this case? Thanks
-
Do you mean the oldNick and newNick parameters that are passed from onPlayerChangeNick event? They would still be different. So it doesn't work!
-
Yes, but that kinda sucks because it doesn't make the script be independent. Another solution would be to check if the player's nick actually changed. Maybe by using a timer. Just wondering why wasEventCancelled apparently doesn't work.
-
Doesn't work either. I also tried to set its priority to low-1 but still the same.
-
Hi, thank you, What are all these drivers? I think I already have them, at least I'm sure about having RealTek. And by the way the first link redirects to a Page not found.
-
Hello, I'm using onPlayerChangeNick event in a script, but apart from this script, I've another one which uses the same event to check if a player has changed his nick more than 3 times in 30 secs, if he changes his nick more than 3 times within 30 secs, it cancels the event, so the nick is not changed. But, on the script I'm working on, how can I check if the event was cancelled by another script? I've this, but it doesn't work. addEventHandler("onPlayerChangeNick", root, function() if wasEventCancelled() then outputChatBox("Cancelled") end end) Thanks.
-
I used to play MTA normally on that PC, also in my laptop, without crashes. All this began around one month ago. I will uninstall MTA and GTA and install them again to be sure it doesn't have custom files. By the way, It only crashes when the votemanager starts a vote, (when the map ends), and also it's like directly proportional to the number of players in the server.. I paid attention to it today and when there were 8+ players it started to crash every time the votemanager started a vote. I could play normally for about 30 mins with less than 5 players. Also, my video settings are the minimum. Even the resolution.
-
Core.log Private folder - http://www.filedropper.com/private
-
Hmm. How to check if the source that triggers the event is different from the resource where it's added? I've 2 scripts, they're both the same but with different name. Client-side: In #1 I have: triggerServerEvent("test", localPlayer) In #2 I have: triggerServerEvent("test", resourceRoot) Server-side: In #1: addEventHandler("test", root, function) In #2: addEventHandler("test", resourceRoot, function)´ -- When I trigger the event from #1 the #2 doesn't listen to it. -- When I trigger the event from #2 the #1 AND the #2 listen to it.. So executes the function attached to the event twice. Having duplicated stuff. In #2, inside the event's attached function I wrote outputChatBox(getElementType(getElementParent(source))) and it output 'root'. But why? How can I make it so that if the source is NOT the same resource where it's located, it returns the function? if source ~= getThisResource() then return end Didn't work, because source is 'root'.. EDIT: This is what I was looking for (https://wiki.multitheftauto.com/wiki/Script_security). Now it's like this: if source ~= resourceRoot then return end
-
Good, thank you. I'll use this topic to ask something else. What happens when we have "global" events such as onPlayerChat or onRaceStateChanging attached to resourceRoot? I've tested and attaching onRaceStateChanging to resourceRoot works, But not for onPlayerChat. This event must be attached to root. But hm, I think I have a better understanding now. In short, use resourceRoot when you're working with events made by yourself
-
Hello, I've an event like this: addEventHandler("onClientGUIChanged", guiRoot, doStuff) So it's attached to all gui elements, but also, if I wanted to make this event called ONLY from the resource where it's running, would I have to change guiRoot to resourceRoot? Thanks.
-
.. I've seen like 3 people with the same personal message: "I ordered some spaghetti with marinara sauce and I got egg noodles and ketchup. I'm an average nobody."
-
* EDITED: So as final solution I got this: Client side: addEventHandler("openGUI", resourceRoot, openGUI) Server side: triggerClientEvent(thePlayer, "openGUI", resourceRoot) Thanks.
-
Hello, Do you know where I can buy BitCoins using SMS and from Lebanon? Thanks.
-
Thanks guys. I'll use arezu's solution
-
Hello, I've a clientside event called openGUI inside Resource1 Then, I made Resource2, and I added a clientside event with the same name (openGUI) Then, when I trigger the event from Resource2, it opens the GUI of Resource2 BUT ALSO the GUI of Resource1. How can I avoid this?
-
Yes, it's adjustable for DM, Race, and more!
-
Yes I'm using that one. Is it enough?
-
Hello, I remembered some time ago I readed some post here on the MTA forums talking about some tricks to prevent uncompiling. I'm trying to find that post back but I still don't find it. I only remembered a trick which consisted to declare a table at the beginning of the script, (like local t = {{{}}}) Do you know other tricks? Thanks.