Jump to content

Help me plz


Haze

Recommended Posts

Posted

Hi all how are You today i try to code this script is to make wanted lvl show up with Dx but when i start the script and i tape the command it dose not work help me plz

function createText ( ) 
    wantedLvl = getPlayerWantedLevel ( ) 
    if wantedLvl == 0 then 
dxDrawText( wantedLvl, 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
   else 
  
dxDrawText( wantedLvl, 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
  
addCommandHandler ( "wanted", createText ) 

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

oh can u help with ur code plz Aibo

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted (edited)

We don't make fixed codes for the people here. We tell you what's wrong, you must fix it yourself.

Edited by Guest
Posted (edited)
function createText () 
addEventHandler ( "onClientRender", root, DrawText ) 
end 
addCommandHandler ( "wanted", createText ) 
  
function DrawText () 
wantedLvl = getPlayerWantedLevel() 
     if wantedLvl == 0 then 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     else 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     end 
end 

Edited by Guest
CiTLh.png
Posted

...But sometimes there is people that breaks the idea of learning how to script, and give you the fixed code just like that. lol.

Posted

any way TAPL thx m8 but i try it its not working m8 thx any way

Benxamix2 im learning but some Time i need Some Help i think u got Help too when u was Beginer

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

huh?

local screenWidth, screenHeight = guiGetScreenSize() 
  
function createText () 
addEventHandler ( "onClientRender", root, DrawText ) 
end 
addCommandHandler ( "wanted", createText ) 
  
function DrawText () 
wantedLvl = getPlayerWantedLevel() 
     if wantedLvl == 0 then 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     else 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     end 
end 

CiTLh.png
Posted

dont post u must u must and u must just how i must learne what Function should i read and dont just put the wiki Link and say Go to Wiki :(

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

dud nvm Im sry cause i post here omg i think u dont wana help pepole i will just wait for JR10 and Solidsnake14

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

i have script, it no work, help pls, me no no whi, Plz help, i lern lua son Promise men Help plz. u don wan hhelp me i wait snake :(

YES! WE ARE EVIL WE NEVER HELP PEOPLE, MWAHAHAHAHA.

If you want help, give us the debug error.. /debugscript 3 and start your script.

Posted

ERROR:dd\server.lua:9:attempt to perform arithmetic on global 'screenHeight' (a nill value)

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted
function createText () 
  
addEventHandler ( "onClientRender", root, DrawText ) 
end 
addCommandHandler ( "wanted", createText ) 
  
function DrawText () 
  
local screenHeight, screenWidth = guiGetScreenSize() 
wantedLvl = getPlayerWantedLevel() 
     if wantedLvl == 0 then 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     else 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     end 
end 

Posted

dammn its not working m8

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted

no error m8 in the deubgscript i just get when i tape the command for the 2 time Render alerday handled and that because i tape it 2 time but there is not Error dammn m8

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted
 function displayText () 
  
local screenHeight, screenWidth = guiGetScreenSize() 
wantedLvl = getPlayerWantedLevel() 
     if wantedLvl == 0 then 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     else 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 0, 0, 255 ), 1.02, "pricedown" ) 
     end 
end 
addEventHandler ( "onClientRender", root, displayText ) 
addCommandHandler ( "wanted", displayText ) 

Probably won't work, but try it

Posted

its not working lol

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

Posted
ERROR:dd\server.lua:9:attempt to perform arithmetic on global 'screenHeight' (a nill value)

you didn't see my post !

if you say not work then you are crazy LOL

local screenWidth, screenHeight = guiGetScreenSize() 
  
function createText () 
addEventHandler ( "onClientRender", root, DrawText ) 
end 
addCommandHandler ( "wanted", createText ) 
  
function DrawText () 
wantedLvl = getPlayerWantedLevel() 
     if wantedLvl == 0 then 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 1.02, "pricedown" ) 
     else 
          dxDrawText(tostring(wantedLvl), 44, screenHeight-41, screenWidth, screenHeight, tocolor ( 0, 255, 0, 255 ), 1.02, "pricedown" ) 
     end 
end 

CiTLh.png
Posted

Thx m8 its Working thx m8

Ingame nick: FWC>Haze

Server I play: FWCentral

Job: FWCentral Developer

Website: fwcentral.net

276473_205836092791903_297368_n.jpg

default.png?k=0e33bf78535ebcd5e63c863cd33516c6&10966802

default.png?k=557262ebc578ba0f5fbb0b9176e6820e&10966803

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