-
Posts
851 -
Joined
-
Last visited
-
Days Won
3
Everything posted by Noki
-
You just use: setElementData(player, "scoreboard-column-name-here", getPlayerGroup(player))
-
For people to help you, you might want to fix your indentation.
-
[email protected] He is also very... not as nice and friendly as you would expect... He will respond, but not maybe what you expect.
-
I'm a part of this organisation, and I can ensure Callum is legitimate and trustworthy. He has been around for a very long time, and been a big part of MTA. The BII have already received requests from people, and servers.
-
I take it it's a .ifp file. You will need to place that in GTA SA, and not an MTA resource.
-
Move the timer inside the function, maybe?
-
MTA needs a break from carbon copy servers. CIT rip offs, RP servers that are bound to fail because they lack originality. A pirate game mode is quite radical, and worth it.
-
MTA isn't a Steam mod. Firstly, you would need to have bought San Andreas on Steam, which comes in a 2.0 .exe file. That itself eliminates most people (we all use pirated copies, face it) from playing it. If we were to use that "join game" function, we'd need to use Steam integration. All of that for losing players? No thanks. Suggested many times. There's a link somewhere on Mantis about this. It's been on Mantis for a number of years now. Please, search before posting.
-
I know how to indent, but I just typed something out quickly in my browser. And yes, indentation is a must.
-
If you've been trying for the past 2 years, and it "doesn't work out for you", then you have no motivation. You need motivation to start with. I remember when I learnt Lua. I sat myself down and said to myself, "I am going to learn this shit even if it drives me crazy". I sat down 6 months ago, and now I can confidently say I'm a reasonable scripter. It's all about motivation and willpower. If you read the Wiki over and over, you'll never learn! It's about writing, testing and fixing and doing it all over again. Just find a simple snippet of code, study it and rewrite it, as tosfera said. I know multiple languages, and that's how I've learnt. Trying. If you don't put effort it, you won't get any return. function helloWorld() outputChatBox("Hello world!") end addCommandHandler("hello", helloWorld) It's all about basics. Good luck.
-
local queryHandle = dbQuery ( connection , "CREATE TABLE IF NOT EXISTS 'data' (name TEXT , cash TEXT , x TEXT ,y TEXT ,z TEXT)" )[/lua] You should use dbExec or executeSQLQuery for creating tables. Also, you're using apostrophes instead of a back tick (`). I recommend you to use back ticks.
-
Save it as an .obj, import into 3DS and export as .DFF.
-
Hi. getNetworkStats()["bytesSent"] How can I convert the return of that function into megabytes?
-
Thank you very much. Works perfectly. I didn't even think of doing that.
-
ERROR: test\c_world.lua:3: attempt to compare number with string function setClientTime(cmd, newTime) if not newTime then outputChatBox("Enter a number between 0 and 23") return end if (newTime > 23) or (newTime < 0) then outputChatBox("You must enter a number between 0 and 23.") return end setTime(tonumber(newTime), 0) end addCommandHandler("settime", setClientTime) There's my code. I don't know why it's showing an error. I've experimented, but nothing will work. Client side. I want to create a settime command, where you can adjsut the time in the argument after. I cannot seem to even do that with this code. I know to remove line 3, 4, 5 and 6 for it to work, but I want to tell the player that he must put a valid number in. I don't want it just fixed, but if someone could tell me what I was doing wrong, I'd appreciate it. Thanks.
-
Well, if you check addCommandHandler, you'll see there is an optional argument. It is for whether the specified command is ACL restricted or not. So, you would need to put that into your /whowas command handler. Then, you need to go to your ACL, and enter the command handler you just made in the ACL rights section.
-
That is fucking brilliant. I just... That's fucking perfect. I'm not asslicking, but that is some awesome designing work.
-
Well, it consists of basically putting information in (dbExec), and getting information (dbQuery). Think of it like MTA function, there are ones that use 'get', and others that use 'set'. Getting and setting data is the same in SQL. Firstly, you need to connect to a database. If you want to use SQLite, you just write 'local connection = dbConnect("database.db", "sqlite")'. Doing that connects to a local .db file, in which your data will be stored. That is now stored as connection. So, you would need to use executeSQLQuery or dbExec to create some tables. executeSQLQuery("CREATE TABLE IF NOT EXISTS `data` blah blah.... Now, you insert some data using dbExec(connection, INSERT INTO blah blah.
-
It's a matter of trust.