kuba90pl
Members-
Posts
36 -
Joined
-
Last visited
Everything posted by kuba90pl
-
chetnie pomoge w rozwoju , mozesz mnie tez uwzglednic kontakt ze mną : [email protected] / gg 3263073
-
Please, can you give me some example?
-
Hey! I have problem with SQL. I cant get results from my DB (I know there is a record (i checkd this with num_rows(=1))) Here is my db schema: dbQuery(db,"CREATE TABLE IF NOT EXISTS avatar(id INT,name TEXT,pass TEXT,food INT,games INT,health INT,energy INT,money INT,time INT)") and here is my problem: function avatarLogin(player,login,pass) local query = dbQuery(db,"SELECT * FROM `avatar` WHERE `name` = ?",login) local result, num_affected_rows, errmsg = dbPoll ( query, -1 ) for i,id in ipairs (result) do for column,val in ipairs (id) do server.log(val[column]) end end end but i dont get anything from this ( i just know that num_affected_rows = 1 so there is a record in db but i cant get retrieve it). Help me please or give me some tip!
-
Hey i wanted to know how to take gui static images by getElementsByType() function. i used getElementsByType("gui-image") and this doesnt work. Help!
-
still doesnt show message while downloading files
-
Hey! I wanted to make a message while downloading files in my server. Well i know i need to use onClientResourceStart , but i dont know which way i need to use it. i tried: function downloadingText() addEventHandler("onClienResourceStart",root,startText) addEvent("downloadingText",true) addEventHandler("downloadingText",root,downloadingText) function startText() addEventHandler("onClientRender",root,napisSciagnie) end function napisSciaganie() local x, y = guiGetScreenSize() dxDrawText ( "ASDASDADADSDASDADDDASDAD", 100,100,400,400, tocolor(255,255,255,255), 2, "default-small", "center","top",false,false,false ) end function join() triggerClientEvent(source,"downloadingText",source) end addEventHandler("onPlayerJoin",root,join) doesnt work. any tips?
-
Hey i got prob: my code: function stworzElementyDomu() local query = dbQuery( arp_db, "SELECT * FROM house") local result, numrows, errmsg = dbPoll ( query, -1 ) if numrows > 0 then for i,dom in ipairs (result) do createObject(1239,result[i][1],result[i][2],result[i][3]) outputChatBox("tworze") end end end addEventHandler("onResourceStart",root,stworzElementyDomu) its output error: createObject[expected number at argument @2 , got nil] my mysql syntax: i want to get ox,oy,oz and create there object for every house.Help please. edit. fixed already. close please this thread.
-
its show in console "rejestracja etc" but in db still in "haslo" value is null
-
help , this script return true but it doesnt change value in db (haslo) function zarejestrujGracza(nazwa,haslo,email) outputChatBox(nazwa) dbFree(dbQuery ( funbox_db, "UPDATE gracze SET haslo = ? WHERE nazwa = ? " , haslo, nazwa )) outputServerLog("Rejestracja: Gracz "..nazwa.." Haslo: "..haslo.." Email: "..email.."") end addEvent("zarejestrujGracza",true) addEventHandler("zarejestrujGracza",root,zarejestrujGracza)
-
BIG BEER FOR YOU ! working , thanks!
-
function zalogujGracza(nazwa,haslo) local dane=dbPoll(dbQuery( funbox_db, "SELECT * FROM gracze WHERE nazwa='"..nazwa.."'" ), -1) if dane then outputChatBox(tostring(dane.haslo)) end end i wanted to receive "haslo" value not serial , anyway i changed it and it still return nil
-
mi ogolnie chodzi o przyklad jak pobrac dane i odczytac je tak abym mogl je potem uzyc. eng: i just want example how to get data and then use it
-
lolw. ja to wiem , mi chodzi o to ze problem polega na pobieraniu danych z mysql. eng: i know outputchatbox , but there's problem with getting data from mysql
-
so if someone didnt understand what i wanted: i just want to get a "haslo" value from a player with specific "nazwa" and i just dont know how
-
function zalogujGracza(nazwa,haslo) local dane=dbPoll(dbQuery( funbox_db, "SELECT haslo FROM gracze WHERE nazwa='"..nazwa.."'" ), -1) outputChatBox(unpack(dane)) end addEvent("zalogujGracza",true) addEventHandler("zalogujGracza",root,zalogujGracza) mysql table: its show error at outputChatBox . so how to get this value? nazwa is right .
-
Hey! I used this script: Lua: function result(sum) if sum ~= "ERROR" then outputChatBox(sum) end end function addNumbers(number1, number2) callRemote ( "http://127.0.0.1/strona/index.php", result, number1, number2 ) end addNumbers ( 123, 456 ) -- call the function index.php: <?php include( "mta_sdk.php" ); $input = mta::getInput(); mta::doReturn($input[0] + $input[1]); ?> and it shows me an error: "attempt to call global 'callRemote' ( a nil value) so what is wrong? i already enabled callRemote function in acl. i use xampp to host index.php
-
server: function aza(gracz,auto) id=getVehicleModelFromName(auto) player=getPlayerFromName(gracz) acc=getPlayerAccount(player) setAccountData(acc,"player.idauta",veh) setAccountData(acc,"player.czymaauto","1") samochody = xmlLoadFile("misc/auta.xml") veh="veh"..math.random(1,9)..""..math.random(1,9)..""..math.random(1,9)..""..math.random(1,9)..""..math.random(1,9).."" xmlCreateChild(samochody, veh) znalezione=xmlFindChild(samochody,veh,0) xmlNodeSetAttribute(znalezione,"modelid",id) xmlNodeSetAttribute(znalezione,"owner",gracz) xmlNodeSetAttribute(znalezione,"posx","-1726.7235107422") xmlNodeSetAttribute(znalezione,"posy","-122.06607055664") xmlNodeSetAttribute(znalezione,"posz","3") xmlNodeSetAttribute(znalezione,"rotx","0") xmlNodeSetAttribute(znalezione,"roty","0") xmlNodeSetAttribute(znalezione,"rotz","0") xmlNodeSetAttribute(znalezione,"plate",gracz) xmlNodeSetAttribute(znalezione,"fuel","100") xmlNodeSetAttribute(znalezione,"water","0") xmlNodeSetAttribute(znalezione,"olej","100") bufferAuto=1 xmlSaveFile(samochody) end addEvent("akceptujZakupAuta",true) addEventHandler("akceptujZakupAuta",root,aza) client: function kupSamochod() nazwa=guiGetText(GUIEditor_Label[1]) buff=tostring(nazwa) name=getPlayerName(localPlayer) triggerServerEvent("akceptujZakupAuta",localPlayer,name,buff,cena) destroyElement(GUIEditor_Window[1]) aMaleOkno("Gratulacje!","Wlasnie kupiles "..buff.." za "..cena.."! ") end ckasa=0 so this script working properly , but its creating 2 vehicles in auta.xml instead of one : <vehicles> <veh44744 modelid="589" owner="Oli" posx="-1726.7235107422" posy="-122.06607055664" posz="3" rotx="0" roty="0" rotz="0" plate="Oli" fuel="100" water="0" olej="100"></veh44744> <veh86335 modelid="589" owner="Oli" posx="-1726.7235107422" posy="-122.06607055664" posz="3" rotx="0" roty="0" rotz="0" plate="Oli" fuel="100" water="0" olej="100"></veh86335> </vehicles> how to fix that , if i want to create only one car? (no 2)
-
hi ! auta.xml: <auta> <car1 id="500" owner="oli" /> <car2" id="502" owner="oli2" /> </auta> index=0 function proste() local autaxml = xmlLoadFile ( "misc/auta.xml" ) if autaxml then index=(index)+1 ind="car"..index.."" outputChatBox(ind) local info = xmlFindChild ( autaxml, ind, 0 ) local attrs = xmlNodeGetAttributes ( info ) value={} for name,value in pairs ( attrs ) do id=value[1] nazwa=value[2] outputChatBox(id) outputChatBox(nazwa) createVehicle(id,-1989,129,27.539062) end end end I want to get id and owner from table value but i dont know how. Help !