Lua:
script_description(".")
function main()
while not isSampAvailable() do wait(100) end
sampRegisterChatCommand('ghh', health)
sampRegisterChatCommand('gapp', armor)
wait(-1)
end
function health()
if not isPlayerDead(PLAYER_HANDLE) then
setCharHealth(PLAYER_HANDLE, 100)
else
print("You are dead!", 1500)
end
end
function armor()
if not isPlayerDead(PLAYER_HANDLE) then
addArmourToChar(PLAYER_HANDLE, 100)
else
print("You are dead!", 1500)
end
end
I can't quite get what is wrong, cmd isn't registering.