You are allocating every time you read the chat, but only free the memory when the condition is true. Don't know if samp crashes, but if it does it's probably because of this.
Dialog hider remembers last dialog id and you can send that dialog multiple times. Only if there is a dialog after you send it you get money. And by the way, don't expect it to work because most servers have a patch against dialog hiders.
Why not just check the player freeze rpc with sampevents?
local sampev = require "lib.samp.events"
-- INCOMING_RPCS[RPC.TOGGLEPLAYERCONTROLLABLE] = {'onTogglePlayerControllable', {controllable = 'bool8'}}
function sampev.onTogglePlayerControllable(controllable)
end
I think that you can't use libraries to press keys because CLEO doesn't work when the ESC menu is active. You need to edit the memory like Parazitas said. Try this:
:Go_ESC
// 0AB1: Go_ESC@ 1 time 10000
2@ = 0xBA67A4
3@ = 0xBA68A4
0A8C: write_memory 2@ size 1 value 1 virtual_protect 0...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.