- 
                Posts827
- 
                Joined
- 
                Last visited
- 
                Days Won1
Everything posted by Cadu12
- 
	function myGate() gate = createObject(980, 1012.5, -902.5, 43, 0, 0, 95) local gateTimer = getTime() if (gateTimer < 6) then moveObject (gate, 500, 96.861328, 1915.637, 30 ) else moveObject (gate, 500, 1012.5, -902.5, 43 ) end end setTimer(myGate, 60000, 0) If you want check, you must wait 60 sec to open/close.
- 
	You can make with shader. This isn't needed.
- 
	Show us your code, and how are you doing it.
- 
	https://wiki.multitheftauto.com/wiki/DxGetStatus Read the wiki about function.
- 
	E precisa de página em português? Para programar é preciso saber o básico de Inglês, se ele não consegue as páginas da Wiki é melhor começar a estudar inglês primeiro. Isso é verdade. É melhor a estudar inglês primeiro e depois aprender Lua. Eu leio wiki em inglês, nem em portugues.
- 
	Quando vc aprendeu Lua que eles te deram links, aqui segue também: https://wiki.multitheftauto.com/wiki/Scr ... troduction Desculpa, este pagina não tem em portugues.
- 
	Do you mean add speedlimit to cars?
- 
	First you use guiCreateStaticImage after use guiCreateComboBox ( at end line ).
- 
	local groupY = 0 for index, group in ipairs ( testGroups ) do friendsList [ "main" ] [ "contacts_group_".. group.name ] = guiCreateLabel(0.00, groupY, 0.98, 0.06, group.name ..":", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) for index, contact in ipairs ( group.contacts ) do friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] = guiCreateStaticImage(0, 0, 0.05, 0.06, "images/".. contact.state ..".png", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) friendsList [ "main" ] [ "contacts_contact_label_".. contact.name ] = guiCreateLabel(0, 0, 0.90, 0.06, contact.name, true, friendsList [ "main" ] [ "contacts_scrollPane" ]) local height = guiLabelGetFontHeight ( friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] ) guiSetSize(friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ], 0.03, ( index * height ) + groupY, true) guiSetSize(friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ], 0.10, ( index * height ) + groupY, true) end groupY = ( ( #group.contacts + 1 ) * guiLabelGetFontHeight ( friendsList [ "main" ] [ "contacts_group_".. group.name ] ) ) + groupY end Try this code. Not tested
- 
	-- Wrong: dxGetFontHeight ( 1, "default-normal" ) / sy -- Use: (dxGetFontHeight ( 1, "default-normal" ) / sy)
- 
	Please do not double-post some hours. You must wait anyone to post.
- 
	As you can see it, becuase of your math. Maybe your font scale are wrong again.
- 
	I can't test it becuase GUI code isnt full. My math are right. I used your math with dxDrawText, and it bugged.
- 
	addEventHandler("onClientRender", getRootElement(), function() local groupY = 0 for index, group in ipairs ( testGroups ) do dxDrawText(group.name, 0, groupY, tocolor(255, 255, 255, 255), 1, Font, "left") for index, contact in ipairs ( group.contacts ) do dxDrawText(contact.name, 10, (index * dxGetFontHeight(1, Font)) + groupY, tocolor(0, 255, 0, 255), 1, Font, "left") --friendsList [ "main" ] [ "contacts_contact_state_".. contact.name ] = guiCreateStaticImage(0.03, ( groupY + 0.10 * index ), 0.05, 0.06, "images/".. contact.state ..".png", true, friendsList [ "main" ] [ "contacts_scrollPane" ]) --friendsList [ "main" ] [ "contacts_contact_label_".. contact.name ] = guiCreateLabel(0.10, ( groupY + 0.10 * index ), 0.90, 0.06, contact.name, true, friendsList [ "main" ] [ "contacts_scrollPane" ]) end groupY = ((#group.contacts + 1) * dxGetFontHeight(1, Font)) + groupY end end) You can edit it, it was problem math, I told you.
- 
	I dont see any wrong, may be problem with math. What do you use font scale? You can try use dxGetFontHeight or guiGetSize.
- 
	We aren't going make scrip for you, only we can do is FIX your script. Please go learn Lua.
- 
	Make your own radar? If so, you have to make maths and dxdraws, but still isnt easy. If not, what do you mean?
- 
	Just copy it from Race gamemode, which it has.
- 
	It will get laggers when you have over 10.000 or 5.000 lines. So you can't make your own library?
- 
	function getCashFromTeamPlayers(team) local amount = 0 if isElement(team) and getElementType(team) == "team" then for i, v in ipairs(getPlayersInTeam(team)) do amount = amount + (getPlayerMoney(v) or 0) end end return amount end 2nd, what do you mean by that?
- 
	First, use SELECT, if returns 0 or doesnt exists, then use INSERT INTO

 
        