Draw Notification does not draw a variable with the value of 0


#1

local v = 0
drawNotification(v)

Draw Notification does not draw a variable with the value of 0

GTA V version? 141
Up to date? Yes
Legit or Pirate copy? Legit
Steam/CD/Social Club? Social Club
Windows version? 8.1 Pro
Did you try to delete caches.xml and try again? Yes
Error screenshot (if any) None
System specifications i7 nVidia
What did you do to get this issue? Played FiveM
What server did you get this issue on? None
CitizenFX.log file No idea where that is
.dmp files/report IDs ditto…

If an issue with starting:
My GTA Folders: https://sites.google.com/site/newgameplay1/FiveM-Screenshots.jpg
Did you try to disable/uninstall your Anti-virus? No Anti-virus. I want to lag. And be part of a bot net.

Also add what you already tried so far.
Banging my head on the wall…


#2

Can you show your whole script please?


#3

This iis where the fucking body would be useful… It would also be nice to see what you’ve written… Since you’ve not… Guess we’ll just have to guess an answer to satisfy you…

Transform it to a string tostring(YOUR_VARIABLE) and use that…


#4

Placed anywhere clientside.this does not notify anything.

local v = 0
drawNotification(v)

Placed anywhere clientside.this notifies the number 1

local v = 1
drawNotification(v)

Your internals, I can only presume, are blocking 0 from being posted because it is 0.

And Havoc… Helping or hurting?


#5

:thinking:I think I’m being a cunt and not providing real advice… What do I know though?

And like I said, it would be nice to see the code for “drawNotification” or, we’re just guessing in the dark at what the solution could be.


#6

I’ve posted the entire code twice


#7

There is no function called drawNotification in FiveM, you probably coded this yourself or found it elsewhere.


#8

You actually need to put the function drawNotification in there, it does not just magically exist.


#9

#10

You just answered your own question… You linked a function called DrawNotification() meanwhile your code shows you’re using drawNotification() take a look at the difference and read the page you linked again to make sure you understand how to use it :wink:


#11

function drawNotification(text)
SetNotificationTextEntry(“STRING”)
AddTextComponentString(text)
DrawNotification(false, false)
end

The fault is in AddTextComponentString(text) ?


#12

That might be because the native is called something else now…(?) not 100% sure if that’d really matter though.
To be sure, try to use this instead:

function drawNotification(text)
    SetNotificationTextEntry("STRING")
    AddTextComponentSubstringPlayerName(text)
    DrawNotification(false, false)
end

Reference:
http://runtime.fivem.net/doc/reference.html#_0x6C188BE134E074AA


#13

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.