Как получить id игрока? (LUA)

Vespan

loneliness
Автор темы
Проверенный
2,105
1,643
Мне нужен код,который делал когда я пишу там допустим на какого игрока я нажал ПКМ + 1 допустим,вводился бы /showpass [ид игрока]​
 
  • Ха-ха
Реакции: Lance_Sterling
Решение
опять дапо скармливает поцыкам скрипты из раздела помощи?

Lua:
function main()
    while not isSampAvailable() do wait(0) end
    while true do wait(0)
        if isKeyDown(2) and isKeyJustPressed(49) then
            result, ped = getCharPlayerIsTargeting(PLAYER_PED)
            if result then
                r, i = sampGetPlayerIdByCharHandle(ped)
                if r then
                    sampSendChat('/showpass '..i)
                end
            end
        end
    end
end

deddosouru

Смотрю аниме, служу Сатане
Друг
2,036
1,320
опять дапо скармливает поцыкам скрипты из раздела помощи?

Lua:
function main()
    while not isSampAvailable() do wait(0) end
    while true do wait(0)
        if isKeyDown(2) and isKeyJustPressed(49) then
            result, ped = getCharPlayerIsTargeting(PLAYER_PED)
            if result then
                r, i = sampGetPlayerIdByCharHandle(ped)
                if r then
                    sampSendChat('/showpass '..i)
                end
            end
        end
    end
end