Jump to content

Castillo

Retired Staff
  • Posts

    21,935
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Castillo

  1. You mean the weapon at the GTA HUD? if so you can hide it with: showPlayerHudComponent
  2. That doesn't make any sense, rowsAssoc should return a table since it's the same as: mysql_rows_assoc.
  3. Well, you just insulted me and many other people who upload compiled scripts for different reasons. Anyway, I'm locking this.
  4. local data = mysql:fetchRow(query) local query = mysql:query("SELECT * FROM `Characters` WHERE `AccountID` = '" .. data[1] .. "'") local rows = mysql:numRows(query) if (rows > 0) then local data = mysql:fetchAssoc(query) local peds = {} for result, row in pairs ( mysql:rowsAssoc ( query ) ) do outputChatBox ( row [ "Name" ] ) end for i = 0, rows do peds[i] = {} peds[i]["CharacterID"] = data["CharacterID"] peds[i]["AccountID"] = data["AccountID"] peds[i]["Name"] = data["Name"] peds[i]["Gender"] = data["Gender"] peds[i]["Age"] = data["Age"] peds[i]["Skin"] = data["Skin"] peds[i]["PosX"] = data["PosX"] peds[i]["PosY"] = data["PosY"] peds[i]["PosZ"] = data["PosZ"] peds[i]["Dimension"] = data["Dimension"] peds[i]["Interior"] = data["Interior"] peds[i]["Health"] = data["Health"] peds[i]["Armour"] = data["Armour"] end triggerClientEvent(thePlayer, "onSuccessLogin", getRootElement(), peds) logIn(thePlayer, account, password) exports.box:showBoxS(thePlayer,"info","Sikeresen bejelentkeztél.") else
  5. So now it only outputs the second character only?
  6. local data = mysql:fetchRow(query) local query = mysql:query("SELECT * FROM `Characters` WHERE `AccountID` = '" .. data[1] .. "'") if (mysql:numRows(query) > 0) then local data = mysql:fetchAssoc(query) while true do local char = mysql:fetchAssoc ( query ) if ( not char ) then break end outputChatBox ( char [ "Name" ] ) end local peds = {} local rows = mysql:numRows(query) for i = 0, rows do peds[v] = {} peds[v]["CharacterID"] = data["CharacterID"] peds[v]["AccountID"] = data["AccountID"] peds[v]["Name"] = data["Name"] peds[v]["Gender"] = data["Gender"] peds[v]["Age"] = data["Age"] peds[v]["Skin"] = data["Skin"] peds[v]["PosX"] = data["PosX"] peds[v]["PosY"] = data["PosY"] peds[v]["PosZ"] = data["PosZ"] peds[v]["Dimension"] = data["Dimension"] peds[v]["Interior"] = data["Interior"] peds[v]["Health"] = data["Health"] peds[v]["Armour"] = data["Armour"] end triggerClientEvent(thePlayer, "onSuccessLogin", getRootElement(), peds) logIn(thePlayer, account, password) exports.box:showBoxS(thePlayer,"info","Sikeresen bejelentkeztél.") else
  7. Just to make sure, you have a column called "Name" in your characters table, right?
  8. Do you know what is trial & error?
  9. local data = mysql:fetchRow(query) local query = mysql:query("SELECT * FROM `Characters` WHERE `AccountID` = '" .. data[1] .. "'") if (mysql:numRows(query) > 0) then local data = mysql:fetchAssoc(query) for index, char in pairs ( data ) do outputChatBox ( index ..": ".. char [ "Name" ] ) end local peds = {} local rows = mysql:numRows(query) for i = 0, rows do peds[v] = {} peds[v]["CharacterID"] = data["CharacterID"] peds[v]["AccountID"] = data["AccountID"] peds[v]["Name"] = data["Name"] peds[v]["Gender"] = data["Gender"] peds[v]["Age"] = data["Age"] peds[v]["Skin"] = data["Skin"] peds[v]["PosX"] = data["PosX"] peds[v]["PosY"] = data["PosY"] peds[v]["PosZ"] = data["PosZ"] peds[v]["Dimension"] = data["Dimension"] peds[v]["Interior"] = data["Interior"] peds[v]["Health"] = data["Health"] peds[v]["Armour"] = data["Armour"] end triggerClientEvent(thePlayer, "onSuccessLogin", getRootElement(), peds) logIn(thePlayer, account, password) exports.box:showBoxS(thePlayer,"info","Sikeresen bejelentkeztél.") else See what does it output.
  10. There is no such event: "onPlayerWeaponUse".
  11. I must know how your mysql resource works.
  12. Try this instead: outputChatBox ( data [ i ] [ "Name" ] )
  13. local data = mysql:fetchRow(query) local query = mysql:query("SELECT * FROM `Characters` WHERE `AccountID` = '" .. data[1] .. "'") if (mysql:numRows(query) > 0) then local data = mysql:fetchAssoc(query) local peds = {} local rows = mysql:numRows(query) for i = 0, rows do outputChatBox ( query [ i ] [ "Name" ] ) peds[v] = {} peds[v]["CharacterID"] = data["CharacterID"] peds[v]["AccountID"] = data["AccountID"] peds[v]["Name"] = data["Name"] peds[v]["Gender"] = data["Gender"] peds[v]["Age"] = data["Age"] peds[v]["Skin"] = data["Skin"] peds[v]["PosX"] = data["PosX"] peds[v]["PosY"] = data["PosY"] peds[v]["PosZ"] = data["PosZ"] peds[v]["Dimension"] = data["Dimension"] peds[v]["Interior"] = data["Interior"] peds[v]["Health"] = data["Health"] peds[v]["Armour"] = data["Armour"] end triggerClientEvent(thePlayer, "onSuccessLogin", getRootElement(), peds) logIn(thePlayer, account, password) exports.box:showBoxS(thePlayer,"info","Sikeresen bejelentkeztél.") else See if it outputs all your character names to the chat.
  14. Must be because: data = mysql:fetchAssoc(query) Is returning only the first character.
  15. What the ...... you are using "onClientPreRender" to check when he's inside the marker? why don't you just use onClientMarkerHit which is a lot easier and efficient?
  16. xTravax: Are you sure it isn't this one? https://community.multitheftauto.com/ind ... ls&id=5711 Same command.
  17. You mean that the server loads the first character twice in the table?
  18. I never used "Host game", always used "MTA server.exe". To remove the vehicles you have to edit the map file that is on resource "play".
  19. That's right. https://wiki.multitheftauto.com/wiki/Anticheat
  20. Principal mente necesitas tener experiencia en Lua, tenes algo? lo basico?
  21. Al morirse el jugador, obtene las armas del mismo y guardalas en una tabla normal, luego al spawnear, daselas.
  22. From where did you get the script? it didn't have a explanation on how to use it?
  23. That's a compiled script, you can't edit it.
×
×
  • Create New...