-
Posts
21,935 -
Joined
-
Last visited
-
Days Won
6
Everything posted by Castillo
-
You mean the weapon at the GTA HUD? if so you can hide it with: showPlayerHudComponent
-
That doesn't make any sense, rowsAssoc should return a table since it's the same as: mysql_rows_assoc.
-
Well, you just insulted me and many other people who upload compiled scripts for different reasons. Anyway, I'm locking this.
-
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
-
So now it only outputs the second character only?
-
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
-
Just to make sure, you have a column called "Name" in your characters table, right?
-
Do you know what is trial & error?
-
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.
-
There is no such event: "onPlayerWeaponUse".
-
I must know how your mysql resource works.
-
Try this instead: outputChatBox ( data [ i ] [ "Name" ] )
-
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.
-
Must be because: data = mysql:fetchAssoc(query) Is returning only the first character.
-
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?
-
xTravax: Are you sure it isn't this one? https://community.multitheftauto.com/ind ... ls&id=5711 Same command.
-
You mean that the server loads the first character twice in the table?
-
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".
-
That's right. https://wiki.multitheftauto.com/wiki/Anticheat
-
Principal mente necesitas tener experiencia en Lua, tenes algo? lo basico?
-
Al morirse el jugador, obtene las armas del mismo y guardalas en una tabla normal, luego al spawnear, daselas.
-
From where did you get the script? it didn't have a explanation on how to use it?
-
That's a compiled script, you can't edit it.