
tommymaster
Members-
Posts
75 -
Joined
-
Last visited
Everything posted by tommymaster
-
Thank you very much!!!!!!!!
-
Hi! Slot1 is a place in inventory. Slot 1 could contain food, drinks, weapons, and keys. So if the player has a "key:"..mysqlID on his slot1 place in inventory, i would like a key icon to be drawn on the screen. if getElementData (localPlayer, "slot1") == "key:"..0 then This would work, but it only draws the key if the slot1 elementdata is 0. I would like to see the key, whatever the number is behind the "key:" string.
-
In my server every vehicle, interior entrance, gate has a key. But my item system won't display the key item picture, until localPlayer hasn't got a "key:any number" at slot1. In other programs we can search for file names as picture.***, and the *** could mean any file extension there, in lua is there a way i can do like the same thing, but with numbers? setElementData (localPlayer, "slot1", "key:"..1, true) if getElementData (localPlayer, "slot1") == "key:"..all the int numbers.."" then --draw key image in inventory else --slot 1 is blank end
-
Hi. I am trying to make an item system, and it would work like this: setElementData (source, "hasItem", {1, 2, 3, 4}, true) I would like to remove, and add item ID-s into this table, but don't really know how. And could you please tell me, for example list the numbers into a gui list for the player?
-
The screen darkens, then becomes clear effect?
tommymaster replied to tommymaster's topic in Scripting
thanks! -
Hi. I have seen an effect on several servers, but i don't really know its name, yet i could use it in my script. The effect i am talking about, is when the screen slowly darkens, turns to complete black, than slowly the black disappears. What is the name of the function i can make such effects? Or is it like a custom function?
-
I tried, it works fine with acceptable framerates. Thanks!!!
-
thank you all guys, if i install windows 10 on this vmware will gta sa work on it, or i should not even expect it to run mta?
-
ahh.... i dont think so, because i would need to bring it to my room every time, and its far more complicated than to just start a virtual os running with my mta client. i hope this will work out. thanks for the DL link
-
Is vmware a free software? If it is where can i download it?
-
Hi! I am not sure if my script would work perfectly, it might have sync bugs. And i would like to test if it works correctly, but how can i? I would not like to take away my sister's notebook, and i would not like to bother my friends to come and test my stuff, because i would like to see it how it works, and if it does not, what are the unexpected stuff that it performs. I tried virtual box, but GTA SA did not open on it by default, however i set the virtual vram to 256MB what should be enough for the game. I guess something else was the problem. But how can i test it? It needs 2 players to be tested correctly. Any suggestion?
-
Hi! If i want to make a let's say a rectangle, and i want to put it to my up-right corner that would not show up for the players, who have a resolution of 1366x768. The average screen resolution in my country is 1366x768, but i am not really sure that players won't have a bigger resolution, anyone i asked had a resolution which is smaller than mine. (1920x1080) So if i would put a rectangle to (1700, 1000) it would not even show up on 1366x768. I know that there is a trick, when i divide the pixel cound than multiply it by the player's pixel count it would show up on the right spot (its like 1700/my x pixel count*players x pixel count), but i have to write this everywhere in my scripts, and whenever i make a mistake in maths it makes me puzzle up to half an hour to look for that mistake, for example if i put numbers between () at the wrong spot and stuff like these. So basicly what i want to ask, is there an easier way to arrange the items to the same-like positions on other people's screen with proportional size and height & width? Sorry that i wrote a lot here, please ask if you have any question in connection with this.
-
Hi! If i want to make a let's say a rectangle, and i want to put it to my up-right corner that would not show up for the players, who have a resolution of 1366x768. The average screen resolution in my country is 1366x768, but i am not really sure that players won't have a bigger resolution, anyone i asked had a resolution which is smaller than mine. (1920x1080) So if i would put a rectangle to (1700, 1000) it would not even show up on 1366x768. I know that there is a trick, when i divide the pixel cound than multiply it by the player's pixel count it would show up on the right spot (its like 1700/my x pixel count*players x pixel count), but i have to write this everywhere in my scripts, and whenever i make a mistake in maths it makes me puzzle up to half an hour to look for that mistake, for example if i put numbers between () at the wrong spot and stuff like these. So basicly what i want to ask, is there an easier way to arrange the items to the same-like positions on other people's screen with proportional size and height & width? Sorry that i wrote a lot here, please ask if you have any question in connection with this.
-
Hi. I want to protect my server from incompetent launches, so i am trying to make a system, whenever the server starts it asks for a 128 character password what is inserted to my database. But i have a little problem. This is the script i have made so far: I just want to debug, if it can poll the password from the database, but the outputChatBox displays a userdata. SERV_LAUNCH_PW = exports.db:sqlQuery("SELECT server_launch_pw FROM server_vars") local result = dbPoll (SERV_LAUNCH_PW, -1) if #result > 0 then outputChatBox (tostring(result)) end function sqlQuery(query, ...) return dbQuery(connection, query, ...) end My SQL script is here too. Also, i have an other question. Is there a way, i don't have to add the dbPoll and #result line each time i make a SELECT query from mysql, and put it into the mysql script instead?
-
How do i hide the pointer of guiCreateEdit()?
tommymaster replied to tommymaster's topic in Scripting
ok thanks, but how do i hide the ponter of editbox? -
Hi. I made a script, in which i created an edit box, then set it's alpha to 0, and i would like to output the text of the invisible edit box, by dxDrawText. This is what i have came up so far: Edit boxes: function createLoginEditBoxes() usernameField = guiCreateEdit(px/2 - field["width"]/2, py/2 - field["height"]/2 - 150/y*py, field["width"], field["height"], "asd", false) guiSetAlpha (usernameField, 0) passwordField = guiCreateEdit(px/2 - field["width"]/2, py/2 - field["height"]/2 - 50/y*py, field["width"], field["height"], "asd", false) guiSetAlpha (passwordField, 0) guiEditSetMasked (passwordField, true) end dxDrawImage (px/2 - field["width"]/2, py/2 - field["height"]/2 - 50/y*py, field["width"], field["height"], "files/inactive.png") if isElement (passwordField) then dxDrawText(guiGetText(passwordField), px/2 - field["width"]/2 + 10, py/2 - field["height"]/2 - 30/y*py, _, _, _, 1/x*px, "default", "left", "center") end The problem is, that the edit boxe's text pointer will not set it's alpha to 0. So the pointer of the edit box remains visible, and protrudes into the text. Screenshot of it: -Also, the edit box (passwordField) is set to masked, but the text in it is not, and the drawText will not mask the text in the editbox.
-
works, thanks!!!!
-
Hi. smoothMoveCamera() (https://wiki.multitheftauto.com/wiki/SmoothMoveCamera) will re-set it's camera position whenever i would set another camera matrix. How could i break this? For example the smoothCam effect's duration is 60 seconds, but after it's start 37 seconds goes by, and an other resource would set the camera target to the local player. (But ofc immediately it resets the camera's position where it was during smoothmove camera guess it's due to it's render event.)
-
sorry, i forgot. thanks for your answer.
-
Hi! I want to make a full unique damage system, and i want to test it on peds. For example if a ped gets a bullet in the arm, it notifies me in debug script that this happened. I searched, but found nothin except onPlayerDamage, which is not concerning peds. Could you help me with this? I mean could you write a script about the example i mentioned above?
-
Hi i want to blur the screen a bit with a shader, but i haven't find a shader for it, and i don't really know how to use shaders. Shall they be under onClientRender? And how can i destroy them?
-
i was thinking about making a function for it, but then realised that i can't make click events for it, and cant destroy it anyhow, and use them as elemenets. I will take a look at dxlib if i can't work this out thanks for the suggestion.
-
can i do it like i add a gui button, and make it transparent somehow, and after it i insert my image to it's place?
-
Hi! I photoshopped a nice flat-looking login panel, but i only know how to attach click events to a button or stuff like buttons, but for example how should i make a script, that notifies me whenever i click on a button, that is right at the middle of the screen, and it's height is 100 and length is also 100?