proracer
Members-
Posts
499 -
Joined
-
Last visited
Everything posted by proracer
-
Can you post whole script?
-
If you mean with concatenation than try this.. function experience() GUIEditor_Window = {} GUIEditor_Label = {} -- local experience = getElementData(getLocalPlayer(),"experience") -- replace the name of key with yours GUIEditor_Window[1] = guiCreateWindow(481,178,579,367,"Experience Panel",false) GUIEditor_Label[1] = guiCreateLabel(27,45,125,25,"Experience:" ..experience,false,GUIEditor_Window[1]) -- here' s the concatenation guiLabelSetColor(GUIEditor_Label[1],255,255,255) guiLabelSetVerticalAlign(GUIEditor_Label[1],"top") guiLabelSetHorizontalAlign(GUIEditor_Label[1],"left",false) end addEventHandler("onClientResourceStart", getRootElement(), experience) Not sure if this works and I dont know if you mean this.
-
It means for who the message will be outputed.
-
You can read a bit... http://lua-users.org/wiki/MathLibraryTutorial
-
I just dont understand this.
-
Never used this though but you can try this. function number () local x = 23.000000502532 outputChatBox("Round number of" ..x.. "is a" ..math.round(23.000000502532)) end addEventHandler("onResourceStart", getRootElement(), number) Here is all information: https://wiki.multitheftauto.com/wiki/Math.round
-
Little hint: https://wiki.multitheftauto.com/wiki/Resource:Missiontimer
-
Use 'team' element besides getRootElement.
-
Change last argument in outputChatBox to false not true.True is used only for colorcodes.Btw why did you used function takePlayerMoney(source, 0) - amount 0 lol? Why did you used the function anyways... it does nothing at all.
-
If you mean the house system, it's probably made with dxDrawRectangle and dxDrawText but Im not sure.
-
Ok this is the last code. function teamBlipColor(source) local r,g,b playerTeam = getPlayerTeam" class="kw2">getPlayerTeam(source) local attachedElements = getAttachedElements(source) if attachedElements and playerTeam then for k,v in ipairs(attachedElements) do if getElementType(v) == "blip" then if #attachedElements > 0 then local r,g,b = getTeamColor(playerTeam) setBlipColor(v, r, g, b, 255) end end end end end addCommandHandler("teamcolor", teamBlipColor) It still does nothing and no errors.I will add some debug messages tommorow as I am tired now.If anyone see's where is the problem than please tell me
-
function teamBlipColor(source) local r,g,b local playerTeam = getPlayerTeam" class="kw2">getPlayerTeam(source) local attachedElements = getAttachedElements(source) if (attachedElements) then if (playerTeam) then for k,v in ipairs(attachedElements) do if getElementType(v) == "blip" then r,g,b = getTeamColor(playerTeam) setBlipColor(v, tonumber(r), tonumber(g), tonumber(b), 255) end end end end end addCommandHandler("teamcolor", teamBlipColor) It's meant for Race gamemode.No errors, does nothing.
-
Just change the X and Y Position of the text in the script.
-
1. You can't use dxDrawText and than guiSetVisible because it requires a GUI element. 2. You are missing some paremeters for the function. 3. I don't understand what you want to do but if you want that text stay on the player's screen all the time use onClientRender.If you do not provide it, the text will be rendered for one frame.
-
And where is the button?
-
Yes take a look. https://community.multitheftauto.com/index.php?p=resources&s=details&id=51
-
Okay, thx I will try.I saw in the file /race/nametags.lua that it uses functions: getCameraMatrix,getPedOccupiedVehicle,getElementPosition,getDistanceBetweenPoints3D and than getScreenFromWorldPosition.
-
I thought if I can anyhow attach GUI element (in this case picture, healthbar) to a player above he's head?
-
Go take a look here. http://code.google.com/p/mtasa-resources/downloads/list
-
As Solidsnake14 said you must this functions: https://wiki.multitheftauto.com/wiki/GetPlayerMoney https://wiki.multitheftauto.com/wiki/TakePlayerMoney https://wiki.multitheftauto.com/wiki/SetGameSpeed Good luck!
-
Try to reinstall MTA and download newest resource package.
