Jump to content

Piorun

Members
  • Posts

    421
  • Joined

  • Last visited

Everything posted by Piorun

  1. O to miło .. a jak pobrać np. id? getAccountData?
  2. Wojak - gadasz jakbyś już miał do czynienia z wielkim projektem (przyznaj się no). Ale niestety tak już jest - lepiej robić coś w tajemnic w góra 2 osoby, a dopiero potem chwalić się na forum o czymś takim - to bardziej zmotywuje ludzi do działania niż szare litery pozbawione "tego czegoś".
  3. Jak do pliku to można taki myk zrobić. 1. Pobrać ilość załadowanych plików (dajmy na to funkcja zwraca nam liczbę ' x ') 2. Tworzymy plik dla gracza, który się zarejestrował z daną id równą ' x + 1 ' Ze sqlite się nie bawiłem, więc jbc. to ci nie pomogę.
  4. Jakbyś robił skrypt, który zapisuje dane do bazy danych MySQL to wystarczy, że stworzysz nową tabelę, w której ustawisz wartość jednej kolumny AUTO_INCREMENT(??) na "true", lub po prostu zaznaczysz haczykiem
  5. Piorun

    Table FTW??

    ah .. i've got an error not in outputChatBox but in addCommandHandler. I fix it but thanks a lot
  6. Piorun

    NPC Problem

    yes, so set rot with function "setPedRotation".
  7. Piorun

    Table FTW??

    newTable = { "1st value", "2nd value" } addCommandHandler("showmetable", getRootElement(), function() for i,v in ipairs(newTable) do outputChatBox(v) end end) I edited my code and i still have an error. Bad argument in outputChatBox
  8. Piorun

    NPC Problem

    So meybe loop this anim?
  9. For your 1st question: here you've got a few functions of dxscoreboard resource: https://wiki.multitheftauto.com/wiki/Dxscoreboard . As you can see there is a "scoreboardAddColumn" function so use that. For your 2nd question: hmm ... createTeam??? And in dxscoreboard set "show teams" to "yes"
  10. Piorun

    NPC Problem

    set in this: https://wiki.multitheftauto.com/wiki/SetPedAnimation parametr "updatePosition" to true.
  11. Piorun

    Table FTW??

    I have a question - why this code doesn't works? newTable = { "1st value", "2nd value" } addCommandHandler("showmetable", getRootElement(), function() for i,v in ipairs(newTable) do outputChatBox(tostring(newTable[i])) end end) ???
  12. W pliku internal.db masz wszystkie konta, aczkolwiek nie wiem jak edytować rozszerzenia .db.
  13. a co przeszkadza ci to że chce sobie zrobić taki skrypt? Pytam, bo a nóż bym coś doradził. Poza tym - po co robić coś na button'a skoro można na bind'a? I na cholerę skrypt, który "wsadza gracza do pojazdu" skoro takie coś w GTA jest ( ). I na koniec - kultura obowiązuje również Ciebie. Pozdro.
  14. hmm it's working .. thanks.
  15. Hi everyone. I've got one question. How to create a table for a function witch i create more than 1 label. For ex. I created a function where i have mysql result who returns a more than 1 rows. So my code in client-side: function blablabla(row1, row2) guiCreateLabel(0,0,100,10, row1.." "..row2, false) end I want this code be able with table for ex. function blablabla(row1, row2) labels = {} labels[1,2,3...] = guiCreateLabel(0,0,100,10, row1.." "..row2, false) end How?
  16. Piorun

    mysql list

    I was thinking about it, but... Hell yeah, it's working - thanks to you !!!
  17. Piorun

    mysql list

    okey, i delete it, it's working, it's showing me a labels, and rectangle, but the how to do a list of labels? I show what i mean: i've got this one, but i want a list of it. How to? Only labels. I'll try to do something with rectangle, don't worry
  18. Piorun

    mysql list

    s***, i found the wrong code. I paste it from another script, and there i've got for one record. I must delete numRows = mysql_num_rows ( result ) if numRows == 1 then and it will be good . Sorry for problems.
  19. Piorun

    mysql list

    Hi, today i've got a problem again -.-. But now with mysql functions included into MTA. My codes: SERWER function getPlayerChars() userid = getElementData(source, "userid") local result = mysql_query(handler, "SELECT * FROM tc_postacie WHERE playerid='"..userid.."'") numRows = mysql_num_rows ( result ) if numRows == 1 then if (result) then while true do local data = mysql_fetch_assoc(result) if (not data) then break end name1 = tostring(data["name"]) name2 = tostring(data["surname"]) triggerClientEvent(source, "onCreateCharsMenu", getRootElement(), name1, name2) end mysql_free_result(result) else end end end addEvent("onClientShowChars", true) addEventHandler("onClientShowChars", getRootElement(), getPlayerChars) CLIENT function crChrMenu(name1, name2) guiCreateLabel(7,20,207,22,name1.." "..name2,false) charname = name1.." "..name2 lenght = string.len(charname) addEventHandler("onClientRender",root, function() dxDrawRectangle(7.0,20.0,60.0,74.0,tocolor(0,0,0,191),false) end ) end addEvent("onCreateCharsMenu", true) addEventHandler("onCreateCharsMenu", getRootElement(), crChrMenu) [lua] It's working good, but for only one record. When mysql returns more than one record it's not working. I added too [lua] outputChatBox(name1) into serwer side, but it's not working too. WTF?
  20. string.len() - it's working. Thanks.
  21. Hi I want today to get a number of letters in word. For ex. I've got word "gta", and i want to create a function which i can output into chat box the number of letters in this word - 3. How to do it?
×
×
  • Create New...