[ESX] Pee/Pooping Script // esx_basicneeds addon

same for me.It doesn’t do nothing.
i’am a woman and it doesn’t works

1 Like

And you have esx_basicneeds bars for it? this is made for esx_basicneeds and esx_status if you want it to be with something else you need to edit it yourself.

Hey,
Yes i have them
where i put it in .cfg?

No the code i have in the readme, you add under the under 2 thirst and hunger.

	TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#0ec94c', -- amarelo
	--TriggerEvent('esx_status:registerStatus', 'hunger', 1000000, '#CFAD0F',
		function(status)
			return true
		end,
		function(status)
			status.remove(40)
		end
	)
	TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0099FF', -- azul
	--TriggerEvent('esx_status:registerStatus', 'thirst', 1000000, '#0C98F1',
		function(status)
			return true
		end,
		function(status)
			status.remove(40)
		end
	)

under

	TriggerEvent('esx_status:registerStatus', 'shit', 1000000, '#663300', -- amarelo
		function(status)
			return true
		end,
		function(status)
			status.remove(40)
		end
	)

	TriggerEvent('esx_status:registerStatus', 'pee', 1000000, '#FFFF00', -- amarelo
		function(status)
			return true
		end,
		function(status)
			status.remove(40)
		end
	)
2 Likes

Thank you mate :slight_smile:

Ok that now shows me the status bars and says “Taking a shit” but my ped still stands there doing no animation? is it because I have the old piss/shit script?

Old? This is the only one i’ve made.

Cannot get this to work sadly. I have ESX Framework, ESX RP Chat etc. Commands enter in but nothing occurs. I see the bars etc. But no animations nothing show in Chat. /pee /poop entered nothing occurs?

And you name the bars shit and pee?, if you look at the command they look after shit and pee

Yes sir. Could the ESX-RP Chat conflict?

I can confirm on a esx server the bars display and the message displays when the commands are entered but the ped just stands there and does nothing

3 Likes

And your status bar is under 200000 value?

As you see here it checks if the status under 200000 then pee, else it will say you dont need to.

    TriggerEvent('esx_status:getStatus', 'pee', function(status)
        if status.val < 200000 then
            ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
                --checks female or male
                if skin.sex == 0 then
                    TriggerServerEvent('esx-qalle-needs:sync', GetPlayerServerId(PlayerId()), 'pee', 'male')
                else
                    TriggerServerEvent('esx-qalle-needs:sync', GetPlayerServerId(PlayerId()), 'pee', 'female')
                end
            end)
        else
            ESX.ShowNotification('You don\'t have to pee right now')
        end
    end)

Not getting any messages just nothing at all. no message interaction I see the bars etc.

This works fine at my end and alot of other i can’t see where this wouldn’t work the only thing if you misspell the register status they need to be “pee” and “shit”.

Other wise just remove those lines that check that and only have

            ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
                --checks female or male
                if skin.sex == 0 then
                    TriggerServerEvent('esx-qalle-needs:sync', GetPlayerServerId(PlayerId()), 'pee', 'male')
                else
                    TriggerServerEvent('esx-qalle-needs:sync', GetPlayerServerId(PlayerId()), 'pee', 'female')
                end
            end)

So once the brown and yellow bar hits nil (empty) I can do the /poop and /pee and I see the animation which is great! looks awesome… but others are asking me how to do it as they stand there with no animation until the bars are empty… is it just a time thing? why do the bars have to be empty? surely if they are full from eating food (the basic needs burgers and water) then surely the piss and poop bars should fill up from empty to full and be able to do the animation/event while the bars have pee and poop in them lol?

1 Like

Because i have this at my server when you eat something the hunger bar go up and etc.

Good script but console errors…

Error running system event handling function for resource esx-qalle-needs: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: Execution of native 000000002f7a49e6 in script host failed.
stack traceback:
        [C]: in upvalue '_in'
        citizen:/scripting/lua/natives_server.lua:341: in function 'TriggerClientEventInternal'
        (...tail calls...)
        server.lua:15: in upvalue 'handler'
        citizen:/scripting/lua/scheduler.lua:175: in function <citizen:/scripting/lua/scheduler.lua:174>
stack traceback:
        [C]: in function 'error'
        citizen:/scripting/lua/scheduler.lua:41: in field 'CreateThreadNow'
        citizen:/scripting/lua/scheduler.lua:174: in function <citizen:/scripting/lua/scheduler.lua:138>

in /pee or /poop commands…

Can you fix this? @qalle

Lemme check on this thanks for replying.

Update

1.1

Fixed some error in console, added config for status bars if you put this to false it will 100% work otherwise it will not work if you dont do it correctly with esx_basicneeds.

Changed way of getting the gender of your character for less callbacks.

1 Like

Fantastic! I wish you continued success. I look forward to the development of this script.