Skip to content

Commit 27e67f4

Browse files
committed
update
1 parent e0e3344 commit 27e67f4

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

SA-MP API/init.lua

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,4 +241,28 @@ function module.SetSpecialAction( actionId )
241241
ffi.cast( 'void ( __thiscall * )( void *, char )', module.Handle + offset.fnSetSpecialAction[module.Version] )( this, actionId )
242242
end
243243

244+
-- Update
245+
function module.AddChatMessage( msgColor, msg )
246+
module.AddMessageToChat( 8, msg, nullptr, msgColor, 0 )
247+
end
248+
249+
function module.TextdrawIsExists( id )
250+
local this = module.Get().pBase.pPools.pTextdraw
251+
if ( this == 0x0 ) then return end
252+
253+
id = tonumber(id) or 0
254+
return this.iIsListed[id] == 1
255+
end
256+
257+
function module.TextdrawGetString( id )
258+
local this = module.Get().pBase.pPools.pTextdraw.textdraw[id]
259+
if ( this == 0x0 ) then return end
260+
261+
id = tonumber(id) or 0
262+
if (module.TextdrawIsExists(id)) then
263+
return this.szText
264+
end
265+
return ''
266+
end
267+
244268
return module

0 commit comments

Comments
 (0)