-
Posts
11 -
Joined
-
Last visited
Posts posted by alexxnder
-
-
Just now, Tekken said:
Well you should use a tabel to store player element like this
playersTable = {}
and after to store it you do this
playersTable[thePlayer] = v[1]
you got it?
Yes, i got it, thank you bro btw the peoples from this forum are really great and friendly and i'm glad to see that!
-
6 minutes ago, Tekken said:
What do you mean by player variable ?
like this:
local data = dbPoll("your data to be returned using normal MySQL");
for i,v in ipairs(data) do
player_variable = v["var_name_in_db"]
end
or
for i,v in ipairs(data) do
skin = v["var_name_in_db"]
end
I don't know if you understand what i want to say, i don't have a good english.
-
9 minutes ago, Tekken said:
local data = dbPoll("your data to be returned using normal MySQL"); for i,v in ipairs(data) do v["var_name_in_db"] end
Please note that this is a simple example for better understanding please read dbPoll wiki page.
Ok, but how can i assign the data from mysql to a player variable ?
-
Va multumesc! Deja m-am apucat sa invat si sincer imi pare rau ca nu am aflat mai devreme de acest client...
- 1
-
Hello how can i load data from MySQL to a player variable ? i searched on google and i didn't found anything to help me
-
24 minutes ago, Patrick said:
root is not the player's element.
You have to use source instead of root, but for this you need to modify triggerServerEvent and set client's element (localPlayer) as event's source instead of getRootElement().
triggerServerEvent("checkPlayerAccount", localPlayer, username, password)
ok thank you, i will watch again at element tree on wiki page. (sorry for my eng)
-
Some images of my code: https://imgur.com/a/NBGSEQK
Console error: https://imgur.com/a/YA6uKIL
What is wrong with that code?
-
32 minutes ago, Dutchman101 said:
You should learn Lua, because it's what MTA uses and it's definately not a C-like language. Pawn isn't useful for MTA.
Useful learning resources:
https://wiki.multitheftauto.com/wiki/Scripting_Introduction
MTA discord > #scripting channels
@alexxnder
Thank you! Have a good day.
-
Hello, MTA SA Community, i am a really good PAWN DEVELOPER and recently i found this client, i love it because there are not so more limits like in SA-MP, but i have a question, should i learn LUA or is more useful to learn PAWN because is a C-like language or doesn't matter ?
-
Salut MTA SA Romania, sunt un PAWN Developer si am descoperit destul de recent MTA-ul si sunt foarte surprins de cate chestii se pot face pe acest client, doar ca, am o mica intrebare, merita sa ma apuc sa invat LUA si sa termin cu SAMP-ul odata pentru totdeauna? LUA ma poate incurca cand o sa invat C++ la liceu? (is clasa a 8 a xD)
Va multumesc anticipat pentru pareri.
[HELP] How can i load data from MySQL to a player variable?
in Scripting
Posted · Edited by alexxnder
Got it (Mersi)
In caz de o sa mai am nevoie de ajutor o sa te mai contactez daca nu te deranjeaza chiar sunt surprins de cate chestii poti face pe acest client