Jump to content

طلب


Recommended Posts

السلام عليكم

ذا الكود

(نسختة من الويكي)

local x,y = guiGetScreenSize()  -- Get players resolution. 
local playerName = getPlayerName ( localPlayer )  -- Get players name. 
local MOTDText = "Welcome to our server, this is a test MOTD script for MTA's Wiki."  -- Example of MOTD message. 
  
function drawStuff() 
    dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, 150 ) ) -- Create our black transparent MOTD background Rectangle. 
    dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, 255 ), 1, "bankgothic" ) -- Create Welcome title. 
        dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, 255 ), 1, "bankgothic" ) -- Create Welcome title shadow. 
    dxDrawLine ( x/3.6, y/3.3, x/1.35, y/3.3, tocolor ( 255, 255, 255, 255 ), 2 ) -- Create underline for title. 
    dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 0, 255 ), 2 ) -- Create underline shadow. 
    dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, 255 ), 1, "clear" ) -- Create MOTD text. 
end 
  
function X() 
    addEventHandler("onClientRender", root, drawStuff)  -- Keep everything visible with onClientRender. 
end 
addCommandHandler("X", X) 
  

وضفت الة

function X() 
    addEventHandler("onClientRender", root, drawStuff)  -- Keep everything visible with onClientRender. 
end 
addCommandHandler("X", X) 
  

لما اكتب الأمر

X

تطلعلي تافذة ال

DX

المطلوب

كود يغلق نافذة ال

DX

وشكرا :)

Link to comment

جربت هذي الطريقة ونجحت

local x,y = guiGetScreenSize()  -- Get players resolution. 
local playerName = getPlayerName ( localPlayer )  -- Get players name. 
local MOTDText = "Welcome to our server, this is a test MOTD script for MTA's Wiki."  -- Example of MOTD message. 
  
local Alpha1 = 150 
local Alpha2 = 250 
  
function drawStuff() 
    dxDrawRectangle ( x/3.8, y/3.8, x/2.02, y/2, tocolor ( 0, 0, 0, Alpha1 ) ) -- Create our black transparent MOTD background Rectangle. 
    dxDrawText ( "Welcome " .. playerName, x/3.5, y/3.6, x, y, tocolor ( 255, 255, 255, Alpha2 ), 1, "bankgothic" ) -- Create Welcome title. 
        dxDrawText ( "Welcome " .. playerName, x/3.48, y/3.58, x, y, tocolor ( 0, 0, 0, Alpha2 ), 1, "bankgothic" ) -- Create Welcome title shadow. 
    dxDrawLine ( x/3.6, y/3.3, x/1.35, y/3.3, tocolor ( 255, 255, 255, Alpha2 ), 2 ) -- Create underline for title. 
    dxDrawLine ( x/3.59, y/3.275, x/1.348, y/3.275, tocolor ( 0, 0, 0, Alpha2 ), 2 ) -- Create underline shadow. 
    dxDrawText ( MOTDText, x/3.6, y/3, x, y, tocolor ( 255, 255, 255, Alpha2 ), 1, "clear" ) -- Create MOTD text. 
end 
  
function X() 
    addEventHandler("onClientRender", root, drawStuff)  -- Keep everything visible with onClientRender. 
    Alpha1 = 150 
    Alpha2 = 250 
end 
addCommandHandler("X", X) 
  
function Close() 
    Alpha1 = 0 
    Alpha2 = 0 
end 
addCommandHandler("XC", Close) 

صحيحة طريقتي ولا خطأ ؟

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...