-
Posts
17 -
Joined
-
Last visited
hxv's Achievements
Square (6/54)
0
Reputation
-
local acc = mysql_query(connect, "SELECT * FROM `accounts` WHERE `login` = '" .. login .. "' AND `password` = '" .. pass .. "'")
-
I don't know from where you have got it. If you don't know what is this I can say that you stole this script.
-
AccountData() functions are recommended for use in RPG's?
hxv replied to Stanley Sathler's topic in Scripting
Im not sure that xml is a bad way. You can use my xmldb. Thank's xmldb you can make your databases in xml file. https://community.multitheftauto.com/index.php?p= ... ls&id=2250 -
You can make variable local turnedOn = false function toggleRadioGUI() if turnedOn == false then turnedOn = true -- here radio is running else turnedOn = false -- here radio is turned off end end then just put condition : if turnedOn == false then .... and something like that
-
It's all on wiki, just read it all https://wiki.multitheftauto.com/wiki/getTickCount This function returns amount of time that your system has been running in milliseconds. By comparing two values of getTickCount, you can determine how much time has passed (in milliseconds) between two events. This could be used to determine how efficient your code is, or to time how long a player takes to complete a task.
-
AccountData() functions are recommended for use in RPG's?
hxv replied to Stanley Sathler's topic in Scripting
Why? xml is very popular in these times, there are few ways to store your data: - MySQL - xml - or your own unknown way ( I have created one time file with .data format and scripted it to little database ) -
server side: addEventHandler("onPlayerLogin", localPlayer, function() -- here your code to hide dx and gui end ) The dx or GUI will not hide when you will write bad login or pass without any conditions.
-
client, I have changed false) to ,false) addEventHandler("onClientResourceStart",root, function() loginButton = guiCreateButton(634, 323, 117, 37, "Zaloguj!", false) loginPassLabel = guiCreateLabel(481, 244, 48, 56, "Login:\n\n\nHaslo:", false) guiSetFont(loginPassLabel,"default-bold-small") registerLabel = guiCreateLabel(363, 424, 397, 86, "Jesli nie posiadasz konta, udaj sie na nasze forum i zarejestruj konto.\nKolejnym krokiem bedzie zalozenie postaci.\n\n\n[url=http://www.LostHeaven.pl]http://www.LostHeaven.pl[/url]", false) guiSetFont(registerLabel,"default-bold-small") loginBox = guiCreateEdit(525, 241, 145, 23, "", false) guiEditSetMaxLength(loginBox, 25) passBox = guiCreateEdit(525, 281, 145, 23, "", false) guiEditSetMasked(passBox, true) guiEditSetMaxLength(passBox, 30) keyImage = guiCreateStaticImage(358, 237, 111, 94, "images/Key.png", false) outputChatBox("Dupa1") addEventHandler("onClientGUIClick", loginButton, function clientSubmitLogin(button, state) if button == "left" and state == "up" then local login = guiGetText(loginBox) local pass = guiGetText(passBox) if login and pass then triggerServerEvent("submitLogin", localPlayer, login, pass) local elements = {loginButton, loginPassLabel, registerLabel, loginBox, passBox, keyImage} destroyElement(elements) guiSetInputEnabled(false) showCursor(false) removeEventHandler("onClientRender",root,createDxOnLogin) else outputChatBox("#EE5555* #C0C0C0Prosze wpisac #EE5555Login #C0C0C0oraz #EE5555Haslo#C0C0C0, aby sie zalogowac!", 255, 255, 255, true) end end end, ,false) showCursor(true) guiSetInputEnabled(true) outputChatBox("Dupa2") addEventHandler("onClientRender", root, createDxOnLogin) end )
-
AccountData() functions are recommended for use in RPG's?
hxv replied to Stanley Sathler's topic in Scripting
You can use also xml instead of MySQL. -
That function which you have showed is invalid. There are not any events etc. This one is valid: function omg_tour() tour = createObject(13607, 238, -1836.2998046875, 13.60000038147, 0, 0, 3.25) createBlipAttachedTo ( tour, 0, 2, 100, 0, 0, 255, 0, 99999.0, getRootElement()) end addEventHandler("onResourceStart",root,omg_tour) and I don't understand what is this: omgMovetour(1) if you want make moving object then just use moveObject function. I don't know too if this is client or server side script. If this is client side then you don't need to add getRootElement() at the end of createBlipAttachedTo function. and you have to change then onResourceStart to onClientResourceStart.
-
Create own event then and get this chunk from the function that uses bind 'm', and create new function that will stop when the music from the GUI radio is turned on
-
Use map editor browser for that. https://wiki.multitheftauto.com/wiki/Resource-Editor.htm
-
You mean sliding Top Times from specified side to specified position? I'm sorry but I don't understand your problem completely. But if you want to make sliding Top Times you can make frames. this example slides label "text" from center to right side local label = guiCreateLabel ( 0.5, 0.5, 1, 1, "text", true ) function executeSlide() -- frame one setTimer( function() guiSetPosition(label,0.5,0.5,true) end ,100,1) -- frame two setTimer( function() guiSetPosition(label,0.6,0.5,true) end ,200,1) -- frame three setTimer( function() guiSetPosition(label,0.7,0.5,true) end ,300,1) -- frame four setTimer( function() guiSetPosition(label,0.8,0.5,true) end ,400,1) -- frame five setTimer( function() guiSetPosition(label,0.9,0.5,true) end ,500,1) -- frame six setTimer( function() guiSetPosition(label,1.0,0.5,true) end ,600,1) end function execute() executeSlide() end addCommandHandler("slide",execute)
-
onClientPlayerRadioSwitch getRadioChannel