-
Posts
1,050 -
Joined
-
Last visited
Everything posted by ViRuZGamiing
-
Try using a bin and change that model to the marker then attach the bin to the marker and set the marker's alpha to 0.
-
I've tried this too a while ago because of his previous post and I tried to get an ID of a created marker and didn't work so they might not have one. what I didn't test tho is saving a marker in a map file and see what the parameters are.
-
he's not planning on showing the code this is all we get to fix it. I've tried speaking to him but hé only wants to do it in skype.
-
[b]Note:[/b] Remember, this event can not be canceled.
-
"i just got errors.." Show them
-
[b]isPedInVehicle[/b] [b]Note:[/b] Client side IsPedInVehicle can be unreliable. Solution is to use: not getPedOccupiedVehicle(ped) Try this; if getPedOccupiedVehicle(localPlayer) then vehicle = getPedOccupiedVehicle(localPlayer) health = math.ceil ( getElementHealth ( vehicle ) /
-
if not (guiGetText(mName) == "") If there has to be something there you gotta check that the text doesn't equal "" what actually means nothing.
-
https://wiki.multitheftauto.com/wiki/Se ... _Functions https://wiki.multitheftauto.com/wiki/Cl ... _Functions Take a look there those are all the Server & Client functions, there are some element velocity things.
-
Still not seeing the FULL thing. What is source? what is poll (probably dbPoll)? what is it's 1st value? ...
-
Throwing in the word useless just made a whole lot of programmers probably make up their mind about helping you. AND apart from that, what you did say is actually "Hey guys, give me the code, I don't want to learn"
-
Well I'll help you if I see the entire deal, I have no idea right know what you are trying to do. The example is correct.
-
Start learning, stop asking. After you learned it we're here to help with your mistakes and learning.
-
You keep changing your code just show the ENTIRE code. It's not like we're about to steal it because we can write it as well. function (source) has to be function () (if this is client sided) Else you make source = commandName
-
Yeah I looked over the table in setElementData setElementData(source, "all", {r,g,b}) -- this has to be source instead of sorce probably addEventHandler("onVehicleEnter", getRootElement(), function (player) local colors = getElementData(player, "all") -- by calling it r, g, b you use 3 variables but the table only needs 1 local r, g, b = unpack(colors) -- here you go from 1 table to 3 variables setVehicleHeadLightColor(source, r, g, b) end)
-
playSound Required Arguments soundPath: the filepath or URL of the sound file you want to play. (Sound specified by filepath has to be predefined in the meta.xml file with tag.) I know it's not like youtube but you can use URL's to play music. I usually listen to german radio and I think their stream works because it's a .mp3 URL. http://stream01.iloveradio.de/iloveradio1.mp3
-
setElementData(sorce, "all", r,g,b) -- this has to be source instead of sorce probably addEventHandler("onVehicleEnter", getRootElement(), function (player) local colors = getElementData(player, "all") -- by calling it r, g, b you use 3 variables but the table only needs 1 local r, g, b = unpack(colors) -- here you go from 1 table to 3 variables setVehicleHeadLightColor(source, r, g, b) end) If this doesn't work, let me see the setElementData function because I don't know what the source is right now.
-
Show us your code that's the way we can help. I think the problem will be somewhere around your r,g,b declaration/setElementData.
-
did you Add the missing ')' on line 8? that was my bad
-
That error you got: Bad argument @ 'getElementData' [Expected bool at argument 3, got number '0'] That was because of your last line 'getElementData', getElementData only needs the element and the data. (source and "all") Where you do have to use 3 parameters are with SET (setElementData(source, "all", colors) For example; addEventHandler("onMarkerHit", markerName, function() local r, g, b = getVehicleColor(vehicle, true) setElementData(vehicle, "color", {r, g, b}) end) -- and later on addEventHandler("onMarkerHit", marker2Name, function() local x, y, z = unpack(getElementData(vehicle, "color") setVehicleColor(vehicle, x, y, z) end) If i'm right at least, btw it's just a random example.
-
The biggest problem with people like you (no offense) is that you are too focussed on trying to achieve the scripts you need for your own server. This is something I had too and lots of other people probably too. The fact is, you should try learning lua not MTA. Not even lua is suggested, C# is good as well, if only you can understand HOW programming works, you can learn any language.
-
Simply you've to make a check, local x,y,z = getElementPosition(localPlayer) local cityname = getZoneName ( x, y, z, true) if (cityname == Los Santos) then --[Your code] end [b]getZoneName[/b]: Returns the string of the zone name => local x,y,z = getElementPosition(localPlayer) local cityname = getZoneName ( x, y, z, true) if (cityname == "Los Santos") then --[Your code] end
-
minHeight is the minimum top position that can be used so it's the first top position. msgHeight is this; msgHeight = math.ceil(string.len(message)/22) Since my chat has a max of 22 Characters horizontal I calculate what my bottom position needs to be depending on how many lines I use (example; 48 characters, 48/22 = 2.18... => ceil = 3) then I multiple the value to the height of 1 line which is 15 different from my minheight
-
Yeah I was thinking that it was weird to use button as an index but then I'll change my table.
-
Nope, did not change anything. Still on the same position. Did use the lineCount.