Object handle id

Warklot

Участник
Автор темы
112
3
Версия MoonLoader
.027.0-preview
Hello is there a way to know if object handle id somehow is connected to me like "this object handle id belongs to me" or something like indicates that this object handle id somehow related to me ?
Lua:
function sampev.onMoveObject(objectId,fromPos,destPos,speed,rotation)
local id = sampGetObjectHandleBySampId(objectId)
    if isObjectOnScreen(id) then
        if objectId~=1 then
if id==("belongs to me") then
sampAddChatMessage("Its mine",-1)
end
end
end
end
 
Последнее редактирование:
  • Вау
Реакции: cort

Shepard

Активный
459
88
Hello is there a way to know if object handle id somehow is connected to me like "this object handle id belongs to me" or something like indicates that this object handle id somehow related to me ?
Lua:
function sampev.onMoveObject(objectId,fromPos,destPos,speed,rotation)
local id = sampGetObjectHandleBySampId(objectId)
    if isObjectOnScreen(id) then
        if objectId~=1 then
if id==("belongs to me") then
sampAddChatMessage("Its mine",-1)
end
end
end
end
If I understand correctly, then you need to somehow find out if the object is on you?
Then check the distance from the player to the object
 

Похожие темы

  1. Ответы
    2
    Просмотры
    1K
  2. Ответы
    1
    Просмотры
    654