drk
Members-
Posts
1,607 -
Joined
-
Last visited
Everything posted by drk
-
Hi ! I've created a dx joinquit in gui editor, but I want to change absolute coordenates to relative, or better, I want to the text adjust on the screen of the player. The code is: --[[------------------------------------------------- -- client script main -- @infoauthor iMortal -- @description: client side script dx joinquit ------------------------------------------------]]-- local textJoin = " " local textQuit = " " local textNick = " " function AbsoluteToRelativ2( X, Y ) local rX, rY = guiGetScreenSize() if ( rX == 1280 ) and ( rY == 720 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/720) return x, y end if ( rX == 1280 ) and ( rY == 600 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/600) return x, y end if ( rX == 800 ) and ( rY == 600 ) then local x = math.floor(X*rX/800) local y = math.floor(Y*rY/600) return x, y end if ( rX == 640 ) and ( rY == 480 ) then local x = math.floor(X*rX/640) local y = math.floor(Y*rY/480) return x, y end end addEventHandler ( "onClientRender", root, local x1, y1 = AbsoluteToRelativ2( 959,246 ) local x2, y2 = AbsoluteToRelativ2( 956,243 ) local x3, y3 = AbsoluteToRelativ2( 943,217 ) local x4, y4 = AbsoluteToRelativ2( 939,213 ) dxDrawText( textQuit, x1, y1, 1224, 264, tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textQuit, x2, y2, 1224, 261, tocolor(255,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x3, y3, 1211.0, 235.0,tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x4, y4, 1207.0,231.0,tocolor(0,255,0,255),0.6,"bankgothic","left","top",false,false,false) end ) But when I join the server don't appear anything, I've created the code when on player join the "textJoin" appear ".... entered the game !" and when a player quit "..... left the server !". Anyone can help me ?
-
'-' Thanks.
-
You think that I'm going to put the entire code here? - '
-
function AbsoluteToRelativ2( X, Y ) local rX, rY = guiGetScreenSize() local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/720) return x, y end addEventHandler ( "onClientRender", root, local x1, y1 = AbsoluteToRelativ2( 959,246 ) local x2, y2 = AbsoluteToRelativ2( 956,243 ) local x3, y3 = AbsoluteToRelativ2( 943,217 ) local x4, y4 = AbsoluteToRelativ2( 939,213 ) dxDrawText( textQuit, x1, y1, 1224, 264, tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textQuit, x2, y2, 1224, 261, tocolor(255,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x3, y3, 1211.0, 235.0,tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x4, y4, 1207.0,231.0,tocolor(0,255,0,255),0.6,"bankgothic","left","top",false,false,false) end ) I tried this too: function AbsoluteToRelativ2( X, Y ) local rX, rY = guiGetScreenSize() if ( rX == 1280 ) and ( rY == 720 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/720) return x, y end if ( rX == 1280 ) and ( rY == 600 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/600) return x, y end if ( rX == 800 ) and ( rY == 600 ) then local x = math.floor(X*rX/800) local y = math.floor(Y*rY/600) return x, y end if ( rX == 640 ) and ( rY == 480 ) then local x = math.floor(X*rX/640) local y = math.floor(Y*rY/480) return x, y end end addEventHandler ( "onClientRender", root, local x1, y1 = AbsoluteToRelativ2( 959,246 ) local x2, y2 = AbsoluteToRelativ2( 956,243 ) local x3, y3 = AbsoluteToRelativ2( 943,217 ) local x4, y4 = AbsoluteToRelativ2( 939,213 ) dxDrawText( textQuit, x1, y1, 1224, 264, tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textQuit, x2, y2, 1224, 261, tocolor(255,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x3, y3, 1211.0, 235.0,tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x4, y4, 1207.0,231.0,tocolor(0,255,0,255),0.6,"bankgothic","left","top",false,false,false) end ) But don't work. And don't have any error, I uused /debugscript 3
-
No, i've do this, when a player enter don't appear the DX text in the screen with your coordenates.
-
When a player join or quit the server don't appear anything.
-
Don't worked, I tried this and this: function AbsoluteToRelativ2( X, Y ) local rX, rY = guiGetScreenSize() if ( rX == 1280 ) and ( rY == 720 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/720) return x, y end if ( rX == 1280 ) and ( rY == 600 ) then local x = math.floor(X*rX/1280) local y = math.floor(Y*rY/600) return x, y end if ( rX == 800 ) and ( rY == 600 ) then local x = math.floor(X*rX/800) local y = math.floor(Y*rY/600) return x, y end if ( rX == 640 ) and ( rY == 480 ) then local x = math.floor(X*rX/640) local y = math.floor(Y*rY/480) return x, y end end addEventHandler ( "onClientRender", root, local x1, y1 = AbsoluteToRelativ2( 959,246 ) local x2, y2 = AbsoluteToRelativ2( 956,243 ) local x3, y3 = AbsoluteToRelativ2( 943,217 ) local x4, y4 = AbsoluteToRelativ2( 939,213 ) dxDrawText( textQuit, x1, y1, 1224, 264, tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textQuit, x2, y2, 1224, 261, tocolor(255,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x3, y3, 1211.0, 235.0,tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin, x4, y4, 1207.0,231.0,tocolor(0,255,0,255),0.6,"bankgothic","left","top",false,false,false) end ) And don't work. Please anyone help.
-
Ok, I will try. And sorry for what I said in another post. When I'm nervous I talk nonsense.
-
Thats how the script i wrote to you is working.. or is it not? Is working but isn't what I want, but thanks for try helping me.
-
I've created the DX text in GUIEditor, but I want to the text adjust to all resolutions. The text appear in same location but adjusted to the resolution to be visible to the player. If resolution is 800 x 600 the text appear under the HUD but adjusted to resolution, if resolution is, ex: 1280 x 720 - Adjust the text to the screen size but in the same location. Understand ?
-
Yes, but it isn't what I want. When a player joins the DX text not adjust to my resolution. Just get the screen size and move that. You understand me ?
-
Thanks for all tried to help me but isn't that I want. I want to adjust the text to all resolutions, example: If a player enter in a server with 800 x 600 resolution, the text is adjusted to that resolution. If a player enter in a server with 1280 x 720 resolution, the text is adjusted to that resolution. If anyone can help, I say "Thanks very much Noob !" ahshahshzhzahzahahzzahsh
-
If you have any ideas or want to help me ....
-
Im not creative. I dont have good ideas '-'
-
'-'
-
All I need is that someone tell me with details how to adjust a DX text to all resolution's. Because I've dont understand "Use the screen width and height and divide, or multiply with a value under 1.."
-
I know ! And it's a variable I don't posted all the code, I only need to someone tell me how to adjust the text to all resolutions '-'
-
Hi everyone ! I'm making a Gangsta's RPG Server. The ideas that I have is: - New Freeroam GUI - New admin system - Login / Register System - Mini Missions / Mini Games - Gang Zones - Gang System - Pay System - Territories System - A spawn system - New HUD - Name Tag System - House sell and house customization - Phone / SMS system - Jobs - Animation system - PM GUI system - Player statistics in GUI like some SAMP RPG Servers - Car shops / Costumizating vehicles in Shop - Appear San Andreas images when downloading client files ( using toursa resource from community as base ) - Scheduled events - Report system ( the report message go to the support server email and Admins get a message that a new message has received ) - JoinQuit in DX ( Finished ) - A save system using MySQL And more ideas that i dont remenber ;S I'm the only scripting in this server. I need help creating: - New Freeroam GUI - Login / Register System - Mini Missions / Mini Games - New HUD - Name Tag System - House sell and house customization - Phone / SMS system - Jobs - Car shops / Costumizating vehicles in Shop - Appear San Andreas images when downloading client files ( using toursa resource from community as base ) - Scheduled events - Report system ( the report message go to the support server email and Admins get a message that a new message has received ) If anyone wants to help me, tell And if anyone know good ideas tell me
-
Can u tell me how to do this, with more details ? And adjust this to mee pls '-' dxDrawText( textJoin,943.0,217.0,1211.0,235.0,tocolor(0,0,0,255),0.6,"bankgothic","left","top",false,false,false) dxDrawText( textJoin,939.0,213.0,1207.0,231.0,tocolor(0,255,0,255),0.6,"bankgothic","left","top",false,false,false) end )
-
I will test it ! Thanks
-
1280 x 720
-
I don't understand nothing '-' Can anyone adjust to me ? pls dxDrawText( textQuit, 959.0, 246.0, 1227.0, 264.0, tocolor(0,0,0,255), 0.6, "bankgothic", "left", "top", false, false, false ) dxDrawText( textQuit, 956.0, 243.0, 1224.0, 261.0, tocolor(255,0,0,255), 0.6, "bankgothic", "left", "top", false, false, false ) Anyonee pls
-
I've created a JoinQuit in DX on GUI Editor, but I want to use guiGetScreenSize() to adjust to all resolutions. Is there any way to discover the coordinates?
-
Ok
-
I don't know but I hate the chat box ahahah' I want to create in DX. And thanks for all that have tried to help. I've solved the problem. Easy Sorry for my FUCK english
