Jump to content

Not oppening


Recommended Posts

Hello guys, when i put the script in my server resource, i can't start it.

Here is my client.lua or maybee the problem is in Meta.xml

local screenW,screenH = guiGetScreenSize()

local resW, resH = 1280, 720

local x, y = (screenW/resW), (screenH/resH)

function HudGtaV ( )

dxDrawImage(x*1145, y*110, x*100, y*50, "img/"..getPedWeapon(getLocalPlayer())..".png")

showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer))

showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer)

dxDrawBorderedText("".. showammo2 ,x*1150, y*75, x*1205, y*40,tocolor(255, 255, 255,255),1.0,"pricedown","right","top",false,false,false)

dxDrawBorderedText("".. showammo1 ,x*1212, y*75, x*750, y*40,tocolor(190, 190, 190,255),1.0,"pricedown","left","top",false,false,false)

local altura = 25

local imageL, imageA = 25,25

--------------------------------------------

end

function toggleRadar()

if isVisible then

addEventHandler("onClientRender", root, HudGtaV)

else

removeEventHandler("onClientRender", root, HudGtaV)

end

isVisible = not isVisible

end

bindKey ("F11", "down", toggleRadar)

local hudTable =

{

"ammo",

"clock",

"health",

"weapon",

"area_name",

"vehicle_name",

"breath",

"clock"

}

addEventHandler("onClientRender", root, HudGtaV)

addEventHandler("onClientResourceStart", resourceRoot,

function()

for id, hudComponents in ipairs(hudTable) do

showPlayerHudComponent(hudComponents, false)

end

end

)

addEventHandler("onClientResourceStop", resourceRoot,

function()

for id, hudComponents in ipairs(hudTable) do

showPlayerHudComponent(hudComponents, true)

end

end

)

function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )

dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false )

dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI )

end

Link to comment
Hello guys, when i put the script in my server resource, i can't start it.

Here is my client.lua or maybee the problem is in Meta.xml

local screenW,screenH = guiGetScreenSize() 
local resW, resH = 1280, 720 
local x, y =  (screenW/resW), (screenH/resH) 
  
function HudGtaV ( ) 
dxDrawImage(x*1145, y*110, x*100, y*50, "img/"..getPedWeapon(getLocalPlayer())..".png") 
  
showammo1 = getPedAmmoInClip (localPlayer,getPedWeaponSlot(localPlayer)) 
showammo2 = getPedTotalAmmo(localPlayer)-getPedAmmoInClip(localPlayer) 
dxDrawBorderedText("".. showammo2 ,x*1150, y*75, x*1205, y*40,tocolor(255, 255, 255,255),1.0,"pricedown","right","top",false,false,false) 
dxDrawBorderedText("".. showammo1 ,x*1212, y*75, x*750, y*40,tocolor(190, 190, 190,255),1.0,"pricedown","left","top",false,false,false) 
  
  
local altura = 25 
local imageL, imageA = 25,25 
  
-------------------------------------------- 
end 
  
function toggleRadar() 
    if isVisible then 
        addEventHandler("onClientRender", root, HudGtaV) 
    else 
        removeEventHandler("onClientRender", root, HudGtaV) 
    end 
    isVisible = not isVisible 
end 
bindKey ("F11", "down", toggleRadar) 
  
  
local hudTable =  
{ 
"ammo", 
"clock", 
"health", 
"weapon", 
"area_name", 
"vehicle_name", 
"breath", 
"clock" 
} 
  
addEventHandler("onClientRender", root, HudGtaV) 
addEventHandler("onClientResourceStart", resourceRoot, 
    function() 
    for id, hudComponents in ipairs(hudTable) do 
        showPlayerHudComponent(hudComponents, false) 
    end 
    end 
) 
  
addEventHandler("onClientResourceStop", resourceRoot, 
    function() 
    for id, hudComponents in ipairs(hudTable) do 
        showPlayerHudComponent(hudComponents, true) 
    end 
    end 
) 
  
function dxDrawBorderedText( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) 
    dxDrawText ( text, x - 1, y - 1, w - 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x + 1, y - 1, w + 1, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x - 1, y + 1, w - 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x + 1, y + 1, w + 1, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x - 1, y, w - 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x + 1, y, w + 1, h, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x, y - 1, w, h - 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x, y + 1, w, h + 1, tocolor ( 0, 0, 0, 155 ), scale, font, alignX, alignY, clip, wordBreak, false ) 
    dxDrawText ( text, x, y, w, h, color, scale, font, alignX, alignY, clip, wordBreak, postGUI ) 
end 

Any errors in debugscript 3 ? If yes then post them here. If there are no erros post your meta.xml

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...