- 12
- 3
- Версия MoonLoader
- Другое
Hello there!
So this mod prints the id of the person you are aiming at in the chat. I want the mod to print Nickname/username in the chat instead of the id.
I tried adding "sampGetPlayerNickname" but it didnt work for me. Can a good hearted soul please edit the code below and add nickname instead of id please.
So this mod prints the id of the person you are aiming at in the chat. I want the mod to print Nickname/username in the chat instead of the id.
I tried adding "sampGetPlayerNickname" but it didnt work for me. Can a good hearted soul please edit the code below and add nickname instead of id please.
Код:
function main()
while not isSampAvailable() do wait(50) end
sampAddChatMessage("{2B60DE}Don't Be Wise! {FFFFFF} By {FF4545}[SALMAN] {FFFFFF}loaded {00FF00}successfully", -1)
while true do
if not (sampIsChatInputActive() or sampIsDialogActive() or isSampfuncsConsoleActive()) then
local res, player = getCharPlayerIsTargeting(playerHandle)
if res and isKeyJustPressed(vkeys. VK_U) then
local result, playername = sampGetPlayerIdByCharHandle(player)
if result then
sampSendChat("/b MOD test: " .. playername .. " !!")
end
end
end
wait(0)
end
end