function main if not isSampLoaded or not isSampfuncsLoaded then return

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('id', function(param)
local pId, nick, score = tonumber(param)
if pId == nil then
for id = 0, 999 do
if sampIsPlayerConnected(id) then
nick = sampGetPlayerNickname(id)
if nick:find(param) then
score = sampGetPlayerScore(id)
sampAddChatMessage('Id '..pId..' | Nick '..nick..' | Score '..score, -1)
break
end
end
end
elseif sampIsPlayerConnected(pId) then
nick, score = sampGetPlayerNickname(pId), sampGetPlayerScore(pId)
sampAddChatMessage('Id '..pId..' | Nick '..nick..' | Score '..score, -1)
else
sampAddChatMessage('down', -1)
end
end)
wait(-1)
end