Jump to content

'LinKin

Members
  • Posts

    636
  • Joined

  • Last visited

Everything posted by 'LinKin

  1. So I will have to UPDATE the FK's each time I change the team's name via script.
  2. Hello, I have this code which is NOT doing what I want.. When I change a team's name (via the script, not modifying it directly into the database with SQLite Browser), the registries at 'account_team' table linked to this team DON'T update their foreign key! Example: Data before the UPDATE: TEAMS TABLE: nametagcolorpointsdescriptionowner Street Warriors|SW|#00FFFF0BlablahLinKin ACCOUNT_TEAM TABLE: accountteam LinKinStreet Warriors Data after the UPDATE: TEAMS TABLE: nametagcolorpointsdescriptionowner Street Warr|SW|#00FFFF0BlablahLinKin ACCOUNT_TEAM TABLE: accountteam LinKinStreet Warriors As you see, the table ACCOUNT_TEAM didn't update its foreing key for the 'team' column.. Breaking the database integrity.
  3. I think I will use latentEvent because the server might freeze for a little while due to the lengh of the text..
  4. Hello, I've a GUI Memo, of course client-side, where the player will type a maximum amount of 400 characters, then I need to store the text he wrote in a SQLite Database, thus, I need to send the text to the server in order to insert it into the database. Is triggerServerEvent enough for this? What's the best way to do it?
  5. Hi, I'm getting this error when I try to call isPlayerIgnoredBy function in vmv_ignore resource. (This is an exported function that I am calling from another script) I don't have clue about that error, I've never seen it before.
  6. Hello, If I have my resource divided into other subfolders; For instance, server-side and client-side script files separated in 'server' and 'client' folders respectively. Whenever I trigger an event from server to client (using triggerClientEvent) will this event be heard in the client-files? Or it has trouble because of the client-side script file that contains the event listener is not in the same folder where the server-side script file triggered the event?
  7. Hello, According to Wiki, in order to allow the server recieve something from other server via callRemote, I must put this in ACL: The question is, do I have to put it like this: ? Is the http_guest user hardcoded in MTA? OR can I use another user? Regards.
  8. Works, but now when closing the window, the cursor doesn't dissapear (because the editBox is focused)
  9. Hello, I want to set the caret index in an edit box (so that when the player opens the main window, he can start typing in the editbox without having to click on it first) I tried -- GUI set Focus (editBox) guiEditSetCaretIndex(editBox, 0) But doesn't work
  10. Hello, How can I set a maximum of 300 characters in a guiMemo?
  11. Hello, can I change the size of the standard GUI fonts?
  12. 'LinKin

    Tyres

    Ofc it will work, but it's not correct... Why would u surround this object in a sphere.. just a matter of logic. You will damage ur tyres if u pass over the middle (center) of the object without actually touching it. I was just posting my advice, they are free to do whatever they want.
  13. 'LinKin

    Tyres

    Sphere? It should be a cuboid. Also you'd need to check the wheels that actually touched the spikes, because you're ignoring this in that script snippet.
  14. wtf? Use player elements, or serials if u want the script to highlight the spectator's nick even after he reconnected
  15. Yes, ok JR10, really thanks a looot. You just saved me a lot of time!
  16. I think I get it. So the when the coroutine gets resumed, the code above the "coroutine.yield();" is not executed, but the code below it is executed. Am I right? Also, what if I have 2 coroutine.yields inside that function and the coroutine yields by the second time, when the function is executed again, is it capable to understand that it must continue with the code-execution that is below the second coroutine.yield?
  17. Yes, well the only solution would be to call another function or trigger an event inside the call back function
  18. Hello, I tried to remove the default ROWID of the tables in SQLite, but I get a warning saying this: dbExec failed; (1) near "WITHOUT": syntax error If I remove the WITHOUT ROWID then it works, and I really don't have problems with the script, but I'd like to save space in the database because this row id is useless (because I am defining PK's in each table) This is the code I use -- Creating 'teams' entity... dbExec(dbHandler, "CREATE TABLE IF NOT EXISTS `teams` (`name` TEXT PRIMARY KEY, `tag` TEXT UNIQUE, `color` TEXT UNIQUE, `points` INTEGER) WITHOUT ROWID") -- Creating 'accounts' entity... dbExec(dbHandler, "CREATE TABLE IF NOT EXISTS `accounts` (`name` TEXT PRIMARY KEY, `team` TEXT, FOREIGN KEY(team) REFERENCES teams(name)) WITHOUT ROWID")
  19. Hello, I've a function (sqlCheck) that executes a dbQuery using a callback function (myCallBackFunc). In the callback function (myCallBackFunc), I process the result etc... But I want to return a value from this callback function (myCallBackFunc) to the function that first called it (sqlCheck). Is it possible? Most likely it's not, just making sure.
  20. Hello, I've been told that using executeSQLQuery hangs the whole server while waiting for response and lacks support for callbacks. I was told to use db* functions for better performance. I assume I'd need to create a resource with its own database file, so that I can connect to it by using dbConnect How to create this .db file (for SQLite) inside the script that I am doing? Regards, Linkin.
  21. Hello, I need to save the text written in a gui-memo by some player into SQL. The player can write something like this: "Hello everyone, I am showing an example. Goodbye, - Me." As you see, it has line-jumps. How can I save this text into SQL so that when I load it back to a gui-memo it still have the line-jumps?
  22. 'LinKin

    In-build SQL

    Hello, Can I declare Primary keys, Foreign keys with the SQL used by MTA? (executeSQLQuery)
  23. I've never used a database to store a text of 400 characters.. I still feel it wierd
×
×
  • Create New...