Jump to content

xRGamingx

Members
  • Posts

    191
  • Joined

  • Last visited

Posts posted by xRGamingx

  1. 11 hours ago, koragg said:

    Seems like you've put the sockets module in the wrong place. Have a look at this: https://wiki.multitheftauto.com/wiki/Modules/Sockets

    Notice that the location is different for 32bit and 64bit systems. Also remember that if your server is on a Windows machine you should get the .dll file. If it's on Linux - you need the .so one. And add the line mentioned in the above post to your mtaserver.conf file. Good luck :)

    Thanks broth , I already did it by connecting to #Rizon-.

    But I want to know how to make the connection with Discord

  2. Someone who can give me help with the irc?

    I'm trying to make it work but I do not set it up. 

    I have the socket charger in the modules folder-.-  Then he used the irc start and he throws this error at me

     INFO: could not start the irc resource, the sockets module isn't loaded!
    INFO: try to start the resource again to retry
    Start up of resource irc cancelled by script
    Stopping irc

  3. 8 hours ago, Gordon_G said:

    @xRGamingxit's a global language section, I think you are supposed to speak English

    Sorry :O , He is my friend and he understands me..but I must not use my language in this session....

    Let us correct and better help what real people ask for bye ...

  4. Hello friend, I'm having a problem with a xXmadeXx resource.

    I have passed the resource to my phone system

    the problem is that when I give my phone open and then I give the modsystem icon, nothing comes out...

    setTimer ( function ( )
    
    function alertMessage ( message, r, g, b )
    	outputChatBox ( message, r, g, b ) -- you can change this to an export or whatever..
    end
    
    local data = getElementData ( localPlayer, "PlayerIpAddress" )
    
    if ( string.sub ( data, 1, 7 ) == "192.168" ) then
    	clientToIp = ipv4IP
    else
    	clientToIp = serverIp
    end	
    httpModDirectory = "http://"..clientToIp..downloadDirectory
    
    ---local sx, sy = guiGetScreenSize ( ) 
    local button = { }
    
    modsfondo[1] = guiCreateGridList(0.00, 0.00, 1.00, 1.00, true, JordanPad)---FONDO---
    tab2[2] = guiCreateTabPanel(0.00, 0.00, 1.00, 1.00, true, JordanPad)  --tab2
    tablistas= guiCreateTab("Mods Opcionales", tab2[2])
    
    
    mods = guiCreateGridList(0.00, 0.00, 1.00, 0.91, true, tablistas)
    
    
    guiGridListSetSortingEnabled ( mods, false )
    guiGridListAddColumn(mods, "Nombre", 0.3)
    guiGridListAddColumn(mods, "Activado.", 0.3)
    guiGridListAddColumn(mods, "Descargado.", 0.3)
    
    button['setstat'] = guiCreateButton(0.38, 0.91, 0.24, 0.09, "Activar Mod", true, tablistas)
    button['dl'] = guiCreateButton(0.00, 0.91, 0.38, 0.09, "Descargar Mod", true, tablistas)
    button['del'] = guiCreateButton(0.62, 0.91, 0.38, 0.09, "Eliminar Mod", true, tablistas)
    guiSetFont( button['setstat'], "default-bold-small")
    guiSetFont( button['dl'], "default-bold-small")
    guiSetFont( button['del'], "default-bold-small")
    
    ---button['exit'] = guiCreateButton(423, 324, 127, 35, "Exit", false, modsfondo[1])
    guiSetEnabled ( button['setstat'], true )
    guiSetEnabled ( button['dl'], true )
    guiSetEnabled ( button['del'], true )
    
    local enabledMods = { }
    local downloadingFiles = { }
    
    addCommandHandler ( "vehmods", function ( )  --------------COMAND
    	local x = not guiGetVisible ( tab2[1] )
    	guiSetVisible ( tab2[1], x )
    	showCursor ( x )
    	refreshModList ( )
    end )
    
    addEventHandler ( "onClientGUIClick", root, function ( )
    	if ( source == button['exit'] ) then
    		executeCommandHandler ( 'vehmods' )
    	elseif ( source == button['dl'] ) then
    		local row, col = guiGridListGetSelectedItem ( mods )
    		if ( row ~= -1 and col ~= 0 ) then
    			local name = guiGridListGetItemText ( mods, row, 1 )
    			if ( not downloadingFiles[name] and not modExists ( name ) ) then
    				downloadMod ( name )
    				alertMessage ( "Downloading the "..name.." mod!", 0, 255, 0 )
    				guiSetEnabled ( source, false )
    				downloadingFiles[name] = true
    			else
    				alertMessage ( "You already have this mod.. It may still be downloading.", 255, 0, 0 )
    				guiSetEnabled ( button['dl'], false )
    				if ( modExists ( name ) ) then
    					guiSetEnabled ( button['setstat'], false )
    					guiSetEnabled ( button['del'], false )
    					guiSetText ( button['setstat'], "Enable Mod" )
    				end
    			end
    		end
    	elseif ( source == button['del'] ) then
    		local r, c = guiGridListGetSelectedItem ( mods )
    		local t, t2 = guiGridListGetItemText ( mods, r, 1 ), guiGridListGetItemText ( mods, r, 2 )
    		if ( t2 == "No" ) then
    			alertMessage ( "Deleting the "..t.." mod.", 255, 0, 0 )
    			guiSetEnabled ( source, false )
    			guiSetEnabled ( button['setstat'], false )
    			guiSetEnabled ( button['dl'], true )
    			guiGridListSetItemText ( mods, r, 3, "No", false, false )
    			for i=1,3 do guiGridListSetItemColor ( mods, r, i, 255, 0, 0 ) end
    			deleteMod ( t )
    		else
    			alertMessage ( "Please disable the mod before deleting it.", 255, 0, 0 )
    		end
    	elseif ( source == mods ) then
    		local row, col = guiGridListGetSelectedItem ( source )
    		if ( row ~= -1 and col ~= 0 ) then
    			local t = guiGridListGetItemText ( mods, row, 1 )
    			guiSetText ( button['setstat'], "Enable Mod" )
    			if ( modExists ( t ) ) then
    				guiSetEnabled ( button['setstat'], true )
    				guiSetEnabled ( button['dl'], false )
    				guiSetEnabled ( button['del'], true )
    			else
    				guiSetEnabled ( button['setstat'], false )
    				guiSetEnabled ( button['dl'], true )
    				guiSetEnabled ( button['del'], false )
    			end
    			if ( enabledMods[t] ) then
    				guiSetText ( button['setstat'], "Disable Mod" )
    				guiGridListSetItemText ( mods, row, 2, "Si", false, false )
    				for i=1,3 do guiGridListSetItemColor ( mods, row, i, 0, 255, 0 ) end
    			else
    				guiGridListSetItemText ( mods, row, 2, "No", false, false )
    				for i=1,3 do guiGridListSetItemColor ( mods, row, i, 255, 0, 0 ) end
    			end
    		else
    			guiSetEnabled ( button['setstat'], true )
    			guiSetEnabled ( button['dl'], true )
    			guiSetEnabled ( button['del'], true )
    		end
    		
    		if ( downloadingFiles[t] ) then
    			guiSetEnabled ( button['dl'], false )
    		end
    	elseif ( source == button['setstat'] ) then
    		if ( not isPedInVehicle ( localPlayer ) ) then
    			local row, col = guiGridListGetSelectedItem ( mods )
    			if ( row ~= -1 and col ~= 0 ) then
    				local t = guiGridListGetItemText ( mods, row, 1 )
    				if ( enabledMods[t] ) then
    					setModEnabled ( t, false )
    				else
    					setModEnabled ( t, true )
    				end
    			end
    		else
    			alertMessage ( "Please get out of your vehicle to use this function.", 255, 0, 0 )
    		end
    	end
    end )
    
    function modExists ( name )
    	if ( name and moddinglist[name] and not downloadingFiles[name] ) then
    		local dff = moddinglist[name][1]
    		local txd = moddinglist[name][2]
    		if ( fileExists ( "mods/"..dff ) ) then
    			if ( moddinglist[name][4] and fileExists ( "mods/"..txd ) ) then
    				return true
    			elseif ( not moddinglist[name][4] ) then
    				return true
    			end
    		else
    			if ( fileExists ( 'mods/'..txd ) ) then
    				fileDelete ( 'mods/'..txd )
    			end
    		end
    	end
    	return false
    end
    
    function downloadMod ( name )
    	if ( name and moddinglist[name] ) then
    		local dff = moddinglist[name][1]
    		local txd = moddinglist[name][2]
    		if ( fileExists ( "mods/"..dff ) ) then
    			fileDelete ( "mods/"..dff )
    		end if ( fileExists ( "mods/"..txd ) ) then
    			fileDelete ( "mods/"..txd )
    		end
    		
    		downloadingFiles[name] = true 
    		local f = fetchRemote ( httpModDirectory.."/"..dff, function ( data, err, name, dff, txd  )  
    			if ( err == 0 ) then
    			
    				local f = fileCreate ( "mods/"..dff )
    				fileWrite (  f, data ) 
    				fileClose ( f )
    				
    				if ( moddinglist[name][4] ) then
    					fetchRemote ( httpModDirectory.."/"..txd, function ( data, err, name, name2 ) 
    						if ( err == 0 ) then
    							local f = fileCreate ( "mods/"..name )
    							fileWrite ( f , data ) 
    							fileClose ( f )
    							
    							alertMessage ( name2.." mod has been downloaded. You can now activate it.", 0, 255, 0 )
    							downloadingFiles[name2] = false 
    							for i=0,guiGridListGetRowCount ( mods ) do
    								local t = guiGridListGetItemText ( mods, i, 1 )
    								if ( t == name2 ) then
    									guiGridListSetItemText ( mods, i, 3, "Si", false, false )
    									local row, col = guiGridListGetSelectedItem ( mods )
    									if ( row == i ) then
    										guiSetText ( button['setstat'], "Enable Mod" )
    										guiSetEnabled ( button['setstat'], true )
    										guiSetEnabled ( button['dl'], false )
    										guiSetEnabled ( button['del'], true )
    									end
    									break
    								end
    							end
    						else
    							alertMessage ( "Error "..err.." for resource "..getResourceName(getThisResource())..". Please report it to an admin.", 255, 0, 0 )
    							deleteMod ( name )
    							downloadingFiles[name] = false
    						end
    					end, "", false, txd, name )
    				else
    					alertMessage ( name.." mod has been downloaded. You can now activate it.", 0, 255, 0 )
    					downloadingFiles[name] = false 
    					for i=0,guiGridListGetRowCount ( mods ) do
    						local t = guiGridListGetItemText ( mods, i, 1 )
    						if ( t == name ) then
    							guiGridListSetItemText ( mods, i, 3, "Si", false, false )		----- 0, 255, 255
                               for i=1,3 do guiGridListSetItemColor ( mods, row, i, 0, 255, 255 ) end							
    							local row, col = guiGridListGetSelectedItem ( mods )
    							if ( row == i ) then
    								guiSetText ( button['setstat'], "Enable Mod" )
    								guiSetEnabled ( button['setstat'], true )
    								guiSetEnabled ( button['dl'], false )
    								guiSetEnabled ( button['del'], true )
    							end
    							break
    						end
    					end
    				end
    			else
    				alertMessage ( "Error "..err.." for resource "..getResourceName(getThisResource())..". Please report it to an admin.", 255, 0, 0 )
    				deleteMod ( name )
    				downloadingFiles[name] = false
    			end
    		end, "", false, name, dff, txd )
    	end
    end
    
    function deleteMod ( name )
    	local m1_dl = false
    	local m2_dl = false
    	if ( name and moddinglist[name] and modExists ( name ) ) then
    		local txd, dff = moddinglist[name][2], moddinglist[name][1]
    		if ( fileExists ( "mods/"..txd ) ) then
    			if ( not fileDelete ( "mods/"..txd ) ) then
    				return alertMessage ( "Failed to delete the "..name.." mod. Please reconnect.", 255, 0, 0 )
    			end
    			m1_dl = true
    		end if ( fileExists ( "mods/"..dff ) ) then
    			fileDelete ( "mods/"..dff )
    			m2_dl = true
    		end
    	end
    	return m2_dl and m1_dl 
    end
    
    function setModEnabled ( t, state, msg )
    	if ( t and moddinglist[t] ) then
    		row = 0
    		if ( msg == nil ) then msg = true end
    		for i=0,guiGridListGetRowCount ( mods ) do
    			if ( guiGridListGetItemText ( mods, i, 1 ) == t ) then
    				row = i
    				break
    			end
    		end
    		local dff, txd, id = unpack ( moddinglist[t] )
    		if ( modExists ( t ) ) then
    			if ( state == false and enabledMods[t] ) then
    				engineRestoreModel ( id )
    				enabledMods[t] = false
    				guiSetText ( button['setstat'], "Enable Mod" )
    				guiGridListSetItemText ( mods, row, 2, "No", false, false )
    				for i=1,3 do guiGridListSetItemColor ( mods, row, i, 255, 0, 0 ) end
    				if ( msg ) then alertMessage ( t.." Mod Disabled!", 0, 255, 0 ) end
    			else
    				if ( moddinglist[t][4] ) then
    					local txd1 = engineLoadTXD ( "mods/"..txd )
    					if ( not txd1 ) then
    						alertMessage ( "Failed to load the mod. Try re-downloading it.", 255, 0, 0 )
    						--return false
    					end
    					if ( not engineImportTXD ( txd1, id ) ) then
    						alertMessage ( "Failed to enable the mod. Try re-downloading it.", 255, 0, 0 )
    						--return false
    					end
    				end
    				local dff = engineLoadDFF ( "mods/"..dff, id )
    				if ( not dff ) then
    					alertMessage ( "Failed loading the mod model. Try re-downloading it.", 255, 0, 0 )
    					--return false
    				end
    				if ( not engineReplaceModel ( dff , id ) ) then
    					alertMessage ( "Failed to replace the mod model. Try re-downloading it", 255, 0, 0 )
    					--return false
    				end
    				enabledMods[t] = true
    				if ( msg ) then alertMessage ( t.." mod enabled!", 0, 255, 0 ) end
    				guiSetText ( button['setstat'], "Disable Mod" )
    				guiGridListSetItemText ( mods, row, 2, "Si", false, false )
    				for i=1,3 do guiGridListSetItemColor ( mods, row, i, 0, 255, 0 ) end
    				--return true
    			end
    		end
    		
    		if ( enabledMods[t] ) then
    			guiSetText ( button['setstat'], "Disable Mod" ) 
    			guiGridListSetItemText ( mods, row, 2, "Si", false, false )
    			for i=1,3 do guiGridListSetItemColor ( mods, row, i, 0, 255, 0 ) end
    		else
    			guiGridListSetItemText ( mods, row, 2, "No", false, false )
    			for i=1,3 do guiGridListSetItemColor ( mods, row, i, 255, 0, 0 ) end
    		end
    		return true
    	end
    	return false
    end
    
    function refreshModList( )
    	guiGridListClear ( mods )
    	for i, v in pairs ( moddinglist ) do
    		local row = guiGridListAddRow ( mods )
    		local exists = "No"
    		if ( modExists ( i ) ) then
    			exists = "Si"
    		end
    		local enabled = "No"
    		if ( enabledMods[i] ) then
    			enabled = "Si"
    		end
    		guiGridListSetItemText ( mods, row, 1, tostring ( i ), false, false )
    		guiGridListSetItemText ( mods, row, 2, tostring ( enabled ), false, false )
    		guiGridListSetItemText ( mods, row, 3, tostring ( exists ), false, false )
    		guiGridListSetItemData ( mods, row, 1, { v[1], v[2], v[3] } )
    		if ( enabled == "No" ) then
    			for i=1,3 do guiGridListSetItemColor ( mods, row, i, 255, 0, 0 ) end
    		else
    			for i=1,3 do guiGridListSetItemColor ( mods, row, i, 0, 255, 0 ) end
    		end
    	end
    	setTimer ( refreshModList, 120000, 0 )
    end
    --setTimer ( refreshModList, 2000, 1 )
    
    addEventHandler ( "onClientResourceStop", resourceRoot, function ( )
    	local file = xmlCreateFile ( '@save.xml', 'data' )
    	for i, v in pairs ( moddinglist ) do
    		local child = xmlCreateChild ( file, 'mod' )
    		xmlNodeSetAttribute ( child, 'name', i )
    		xmlNodeSetAttribute ( child, 'enabled', tostring ( isset ( enabledMods[i] ) ) )
    	end
    	xmlSaveFile ( file )
    	xmlUnloadFile ( file )
    end )
    
    function toboolean ( input )
    	local input = string.lower ( tostring ( input ) )
    	if ( input == 'true' ) then
    		return true
    	elseif ( input == 'false' ) then
    		return false
    	else return nil end
    end
    
    function isset ( value )
    	if ( value ) then
    		return true
    	end
    	return false
    end
    
    
    end, 500, 1 )

    and for the panel to appear I must use the xXMadeXx panel command,,I want the panel to open as soon as I click on the modsystem icon

    resource: modsys

    DC4YkhJ.png?1

     

    MNgsCbk.png?1

  5. 9 hours ago, Mahlukat said:
    
    carshopWindow = guiCreateWindow(0.01, 0.22, 0.39, 0.58, "CarShop", true)
    guiSetVisible(carshopWindow, false)
    guiSetAlpha(carshopWindow, 1)
    guiWindowSetSizable(carshopWindow, false)
    carGridList = guiCreateGridList(0.02, 0.06, 0.47, 0.80, true, carshopWindow)
    guiGridListSetSelectionMode(carGridList, 0)
    carColumn = guiGridListAddColumn(carGridList, "Car", 0.4)
    costColumn = guiGridListAddColumn(carGridList, "$", 0.4)
    
    
    local cars = {
    	["Level1"] = { ------------------TEXT TEX
    		{481, 50000},-- BMX  
    		{509, 50000},-- bike
    		{529, 55000},-- Willard
    		{492, 60000},-- Gleenwood
    	},  
    	["Level2"] = { ------------------TEXT TEX
    		{421, 60000},-- Whasington 
    		{466, 65000},-- Glendale
    		{422, 65000},-- Bobcat
    		{600, 70000},-- Picador
    		{578, 70000},-- DFT-30
    		{582, 70000},-- Newsvan
    		{410, 71000},-- Manana
    		{489, 75000},-- Rancher  
    		{474, 75000},-- Hermes
    		{491, 75000}, -- Virgo
    	},
    }  
    
    function setTexts()
    	for i,v in pairs(cars) do
    		local row = guiGridListAddRow(carGridList)
    		guiGridListSetItemText(carGridList,row,1,i,true,false)
    		for i,k in pairs(v) do
    			local model,price = unpack(k)
    			local row2 = guiGridListAddRow(carGridList)
    			guiGridListSetItemText(carGridList,row2,1,getVehicleNameFromModel(model),false,false)
    			guiGridListSetItemText(carGridList,row2,2,price,false,false)
    		end
    	end
    end	
    setTexts()
    

     

    Look My code 

    carshopWindow = guiCreateWindow(0.01, 0.22, 0.39, 0.58, "CarShop", true)
    guiSetVisible(carshopWindow, false)
    guiSetAlpha(carshopWindow, 1)
    guiWindowSetSizable(carshopWindow, false)
    carGridList = guiCreateGridList(0.02, 0.06, 0.47, 0.80, true, carshopWindow)
    guiGridListSetSelectionMode(carGridList, 0)
    carColumn = guiGridListAddColumn(carGridList, "Car", 0.4)
    costColumn = guiGridListAddColumn(carGridList, "$", 0.4)
    local cars = {
      ["Level1"] = { ------------------TEXT TEX ERROR ..
      {481, 50000},-- BMX  
      {509, 50000},-- bike
      {529, 55000},-- Willard
      {492, 60000},-- Gleenwood
      {421, 60000},-- Whasington 
      {466, 65000},-- Glendale
      {422, 65000},-- Bobcat
      {600, 70000},-- Picador
      {578, 70000},-- DFT-30
      {582, 70000},-- Newsvan
      {410, 71000},-- Manana
      {489, 75000},-- Rancher  
      {474, 75000},-- Hermes
    }
    for i, v in ipairs(cars) do
      local carName = getVehicleNameFromModel(v[1])
      local row = guiGridListAddRow(carGridList)
      guiGridListSetItemText(carGridList, row, 1, carName, false, true)
      guiGridListSetItemText(carGridList, row, 2, tostring(v[2]), false, true)
    end

     

  6. How can I put a text in the middle of this list of cars?

    I think I'm putting the wrong text --Level1 and Level2

    ---I need to put this name, Example: 
    
    carshopWindow = guiCreateWindow(0.01, 0.22, 0.39, 0.58, "CarShop", true)
    guiSetVisible(carshopWindow, false)
    guiSetAlpha(carshopWindow, 1)
    guiWindowSetSizable(carshopWindow, false)
    carGridList = guiCreateGridList(0.02, 0.06, 0.47, 0.80, true, carshopWindow)
    guiGridListSetSelectionMode(carGridList, 0)
    carColumn = guiGridListAddColumn(carGridList, "Car", 0.4)
    costColumn = guiGridListAddColumn(carGridList, "$", 0.4)
    
    
    local cars = {
    {"Level1"} ------------------TEXT TEX
      {481, 50000},-- BMX  
      {509, 50000},-- bike
      {529, 55000},-- Willard
      {492, 60000},-- Gleenwood
    {"Level2"} ------------------TEXT TEX
      {421, 60000},-- Whasington 
      {466, 65000},-- Glendale
      {422, 65000},-- Bobcat
      {600, 70000},-- Picador
      {578, 70000},-- DFT-30
      {582, 70000},-- Newsvan
      {410, 71000},-- Manana
      {489, 75000},-- Rancher  
      {474, 75000},-- Hermes
      {491, 75000} -- Virgo

     

  7. Hola amigo , te esta diciendo todo el log:: Sigue los pasos 

    1)-- Anda a esta ubicación y abre el archivo main.lua >> WARNING: players/main.lua(Line 379) [Server] setPedFrozen  y remplaza esto setPedFrozen por esta--> setElementFrozen.

    2)-- Anda a esta ubicación y abre el archivo main.lua >> WARNING: players/main.lua(Line 46) [Client] showPlayerHudComponent y remplaza esto showPlayerHudComponent por esta--> setPlayerHudComponentVisible 

    sigue los pasos por cada linea , fijate que te esta diciendo lo que tienes que hacer amigo , solo tienes que reemplazar  . cualquier cosa hablame en privado y te ayudo 

  8. STAFF = createTeam ("STAFF", 255, 255, 255)

     

     

    How can I make the team Staff change the rbg colors? RGB etc 

    I just want the team staff to have several random colors

  9. 5 hours ago, NeXuS™ said:

    You can't. guiLabels are created when you call the function, and don't update automatically. You'll have to create a function that'd update the text accordingly to the player's health.

    How can that be done?

  10. On 30/5/2018 at 00:25, purplecementary91 said:

    buenas
    ~
    tengo un error con la gm de roleplay [ paradise ] es un error de mysql y no se mucho de mysql
    y ya cambie lo del sql [ lo del host y user, etc ] y tambien el settings, me crea todas las tablas menos la que dice characters

    [xx-xx-xx xx:xx:xx] ERROR: sql\layout.lua:91: Unable to create table characters

    [ soy nuevo en el foro ]

    ~gracias de antemano.

    Hola @purplecementary91 si sigues necesitando ayuda avísame, me dedico a mysql !,  en esto momento ando montando unos sistema por via mysql ,. Saludos ..

  11. 5 hours ago, IIYAMA said:

    There is no need to do complex stuff. It can be very simple if you spend some time on finding a logic solution.

     

    Untested code.

     

    
    local blockSize = (sY / 900) * 10

    Define the block size


     

    
    local index = #dxMessages + 1dxMessages[index] = {message = "hi"}-- set position datadxMessages[index].positionY = blockSize * (index - 1)

    Define it's position if item is added last

     

    
    local index = 1-- move all items 1 downfor i=1, #dxMessages do	dxMessages[i].positionY = dxMessages[i].positionY + blockSizeend-- insert at the start of the table and push all other items to the next index.table.insert(dxMessages, index, {message = "hi"})-- set position datadxMessages[index].positionY = blockSize

    Define it's position(s) if item is added first.

     

     


    While rendering:

    
    for index = 1, #dxMessages do	local messageData = dxMessages[index] end--reversefor index = #dxMessages, 1, -1 do	local messageData = dxMessages[index] end

    Just use a normal loop. So you have full control over it.

     

    And now you can rock!

     

     

    Box/text from bottom to top. Please edit to your layout.

     

    
    dxDrawRectangle(sX / 4 + 1, sX - blockSize, (sX / 4) * 3 + 1, 0, tocolor(0, 0, 0, 93), false)

    Loop

    
    local startX, startY = sX / 4 + 1, sY - messageData.positionY - blockSizelocal endX, endY = (sX / 4) * 3 + 1, startY - blockSize * #dxMessagesdxDrawText(messageData.message, startX, startY, endX, endY, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)

     

     

    Something like that...

    Hello friend, I do not understand your code

    I just want to add the dxRetangle that post to my code 

    Here I show you the error

    local sX, sY = guiGetScreenSize()
    local dxMessages = {}
    local dxMessagesY = {-25, -25, -25, -25}
    local dxMessagesTick = {}
    local isMoving = false
    
    function drawMessages()
    	for index, messageData in pairs(dxMessages) do
    		dxDrawText(messageData[1], sX / 4 + 1, (sY / 900) * (dxMessagesY[index] * 2) + 1, (sX / 4) * 3 + 1, (sY / 900) * 25 + 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)
    		dxDrawText(messageData[1], sX / 4  + 1, (sY / 900) * (dxMessagesY[index] * 2) - 1, (sX / 4) * 3 + 1, (sY / 900) * 25 - 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)
    		dxDrawText(messageData[1], sX / 4  - 1, (sY / 900) * (dxMessagesY[index] * 2) + 1, (sX / 4) * 3 - 1, (sY / 900) * 25 + 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)
    		dxDrawText(messageData[1], sX / 4  - 1, (sY / 900) * (dxMessagesY[index] * 2) - 1, (sX / 4) * 3 - 1, (sY / 900) * 25 - 1, tocolor(0, 0, 0, 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)
    		dxDrawText(messageData[1], sX / 4, (sY / 900) * (dxMessagesY[index] * 2), (sX / 4) * 3, (sY / 900) * 25, tocolor(messageData[2], messageData[3], messageData[4], 255), (sX / 1440) * 1.1, "default-bold", "center", "center", false, true, false)
         
              dxDrawRectangle(sX * 0.2922, sY * 0.0065 * (dxMessagesY[index] * 2), sX * 0.4203, sY * 0.0273, tocolor(0, 0, 0, 93), false)--DXRETANGLE ----LOOK
    
    	end
    end
    addEventHandler("onClientRender", root, drawMessages)
    
    function new(message, r, g, b)
    	message = tostring(message)
    	if (dxGetTextWidth(message, (sX / 1440), "default-bold") > 750) then
    		new(message:sub(1, 747).."...", 255, 0, 0)
    		return
    	end
    	r, g, b = r or 255, g or 255, b or 255
    	if (#dxMessages == 4 or isMoving) then
    		Timer(new, 1000, 1, message, r, g, b)
    		return
    	end
    	table.insert(dxMessages, {message, r, g, b})
    	dxMessagesTick[#dxMessages] = getTickCount()
    	addEventHandler("onClientRender", root, addMessage)
    	isMoving = true
    	outputConsole(message)
    end
    addEvent("dx.new", true)

    cbxlNci.jpg

  12. 3 hours ago, IIYAMA said:

    Where is your rectangle?

    Quote
    
    
    
    ---local screenW, screenH = guiGetScreenSize()
    
    
            dxDrawLine((screenW * 0.2922) - 1, (screenH * 0.0065) - 1, (screenW * 0.2922) - 1, screenH * 0.0339, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.7125, (screenH * 0.0065) - 1, (screenW * 0.2922) - 1, (screenH * 0.0065) - 1, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine((screenW * 0.2922) - 1, screenH * 0.0339, screenW * 0.7125, screenH * 0.0339, tocolor(0, 0, 0, 255), 1, false)
            dxDrawLine(screenW * 0.7125, screenH * 0.0339, screenW * 0.7125, (screenH * 0.0065) - 1, tocolor(0, 0, 0, 255), 1, false)
    
            dxDrawRectangle(screenW * 0.2922, screenH * 0.0065, screenW * 0.4203, screenH * 0.0273, tocolor(0, 0, 0, 93), false)--

     

    dakHdcs.png?1

×
×
  • Create New...