-
Posts
877 -
Joined
-
Last visited
Everything posted by denny199
-
Show your code.
-
Output the bottom x,y somewhere Somewhere: local myLabel = guiCreateLabel ( 0, 0, 1, 1, "", true ) in Client render: guiSetText ( myLabel, "y:" ..(((middle+56)*(sh/1080))+((28*(sh/1080))*players))+((28*(sh/1080))*(addTeam)) ) ) Because the Y position might be wrong.
-
What do you mean, i don't see any cutting??
-
Guess you want to make stactics for all players who is in a boat, plane etc, tell us what you want for i, player in ipairs(getElementsByType("player")) do if (isPedInVehicle(player)) then transport = getVehicleType( getPedOccupiedVehicle ( player ) ) end end if not. then try this: for i, player in ipairs(getElementsByType("player")) do if (isPedInVehicle( player )) and (getVehicleType( getPedOccupiedVehicle(player)) == "Automobile" ) then transport = "Automobile" end end
-
there are two ways, removing the angle variable and then use: setElementRotation(elem, 0, 0, (getElementRotation(elem)+1)) -- play arround with +1 or +2 etc. But by this function the fps will have a huge effect OR local angle = math.fmod((getTickCount() - g_PickupStartTick) * 360 / 2000, 360) Change the "divided by"(/) to less like / 1000 What you did there. Just to make it clear for everyone who is interested for making it faster. Have fun anyways, goodluck with scripting
-
I think he ment the race pickups. if so, search for race_client.lua for "updatePickups"
-
https://wiki.multitheftauto.com/wiki/DxDrawLine See second example. BTW, did you calculated the w,h too? or did you just let it stayed it like [x*0.25,y*0.25,200,200] Can you show me your draw technique so I can test it for myself?
-
You are ASKING us to do it. Please, try it for yourself first and then post your tried code here, or are you just so lazy?
-
Try it for yourself first, and then if it doesn't work post it here. Ignore those other 2 guys btw, you need more functions here they are: https://wiki.multitheftauto.com/wiki/On ... hicleEnter https://wiki.multitheftauto.com/wiki/Se ... rtyEnabled https://wiki.multitheftauto.com/wiki/GetElementModel https://wiki.multitheftauto.com/wiki/GetElementData Also for server side for chekking the admin: https://wiki.multitheftauto.com/wiki/IsObjectInACLGroup https://wiki.multitheftauto.com/wiki/SetElementData https://wiki.multitheftauto.com/wiki/OnPlayerLogin Good luck.
-
script your own ped instead, also if you are testing in editor put it then in dimension 200.
-
http://bugs.mtasa.com/view.php?id=6239
-
Read beneath onClientPlayerJoin. use onClientResourceStart. addEventHandler("onClientResourceStart", resourceRoot, drawSpawnScreen)
-
No problem, also here are some exaples for a "not" statement, since "not" is very handy it can be used for changing "true" and "false" like here: variable = false addCommandHandler ( "chekState", function () local status = not variable outputChatBox ( status ) --will return "true" end) --or addCommandHandler ( "chekState2", function () variable = not variable outputChatBox ( status ) --will return "true" or "false" since it will overwrite the variable with the not statement end) Also you can use it with some returns of the default functions of mta, let's take "guiGetVisible" Usage: bindKey ( "f1", "down", function () local show = not(guiGetVisible ( guiElement )) guiSetVisible ( guiElement, show ) showCursor ( show ) end) This 'not' statement might be faster than checking with "if" and "elseif" statements. Also, keep the scripting up, feel free to ask more @ the forums, we are loving to help you Kindly regards, Danny
-
if ( serverName == "GummyBear, false" ) then Doesn't make any sence try: if ( getServerName ( ) == "GummyBear" ) then if the server name is "gummybear" it will trigger the event. if you don't want that ( i guess ). then you will need a NOT statement. if not ( getServerName ( ) == "GummyBear" ) then this will trigger if the server name isn't "gummybear"
-
it cheks for "Label" instead of "Label1"
-
(late post) Welcome to the holidays, kids don't have something to do, they gonna start to DDoS. It's pretty annoying even my server it down from those DDoS'ers. And many other servers. I hope that those DDoS kids will get caught once, since everey single retard with friends and a pc can make a DoS or a DDoS. Also, don't blame the company it's just like I have a glass full of water, while it slips out off my hand on the ground, then it isn't my fault since it's slipped out off my hand.
-
Try to rename it and edit the script, had these problems to with skin loading "invalid skin maccer.txd" then it didn't load for me nor other players.
-
Disable the low-lod when you are nearby? https://wiki.multitheftauto.com/wiki/On ... ntStreamIn https://wiki.multitheftauto.com/wiki/On ... tStreamOut https://wiki.multitheftauto.com/wiki/SetLowLODElement edit: oh already said ;p
-
Wrong. You can add new objects with some knowlegde, just replace a object which is farther away from you, so that it will look like a new object, when the object streams out you need to unload the model, etc.
-
Wrong. return, the word is actaully saying it. it will return a value. Like the quote above you can use by foo1: local chek1 = foo1() -- will return 'a'
-
You can use tables or element data like: setElementData ( playerElement, "money", 500 ) and then gain it with getElementData ( playerElement, "money" )
-
>= means greater than or equal to > means greater than <= means less than or equal to < means less than == means equal to ~= means not equal to I have learned this the first year of primary school, so you need to know it too.
-
it isn't working because you are creating the image every frame, use variables instead with guiSetPosition and guiSetSize
-
Use this function I don't know who made this function, just found it on the forums. function guiCreateColorLabel( ax, ay, bx, by,str, bool, parent ) local pat = "(.-)#(%x%x%x%x%x%x)" local s, e, cap, col = str:find( pat, 1 ) local last = 1 local r,g,b while s do if cap == "" and col then r,g,b = tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ) end if s ~= 1 or cap ~= "" then local w = dxGetTextWidth( cap ) avc321 = guiCreateLabel( ax, ay, ax + w, by,cap,bool,parent ) if not r then r = 255 end if not g then g = 255 end if not b then b = 255 end guiLabelSetColor( avc321,r,g,b ) ax = ax + w r,g,b = tonumber( "0x"..col:sub( 1, 2 ) ), tonumber( "0x"..col:sub( 3, 4 ) ), tonumber( "0x"..col:sub( 5, 6 ) ) end last = e + 1 s, e, cap, col = str:find( pat, last ) end if last <= #str then local cap = str:sub( last ) local w = dxGetTextWidth( cap ) local avc123 = guiCreateLabel( ax, ay, ax + w, by,cap,bool,parent ) guiLabelSetColor( avc123,r or 255,g or 255,b or 255 ) return avc123 end end
