command = '/hide deagle'
command1 = '/hide shot'
command2 = '/hide m4'
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand("tr", ActivFunc)
name = sampGetPlayerNickname(int id)
if sampGetPlayerNickname(id) ~= 'DolgorukovGTA' then
thisScript():unload()
end
while true do
wait(0)
if isCharDead(PLAYER_PED)then
sampSendChat(command)
sampSendChat(command1)
sampSendChat(command2)
wait (5000)
end
end
end
end
function ActivFunc(param)
enabled = not enabled
if enabled then
sampAddChatMessage('{99ccff}TR {ffffff}активирован. ({34c924}DolgorukovGTA{ffffff})')
else
sampAddChatMessage('{99ccff}TR {ffffff}деактивирован. ({34c924}DolgorukovGTA{ffffff})')
end
end
Вот полный код, все равно не работает, хотя и твое добавил.
В логе вот это:
[20:12:20.171534] (error) tr.lua: ...ps\common\Grand Theft Auto San Andreas\moonloader\tr.lua:8: ')' expected near 'id'
[20:12:20.171534] (error) tr.lua: Script died due to an error. (1E148BBC)