local mem = require 'memory'
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand("wh", wh)
while true do wait(0) end
end
function nameTagOn()
local pStSet = sampGetServerSettingsPtr()
NTdist = mem.getfloat(pStSet + 39)
NTwalls = mem.getint8(pStSet + 47)
NTshow = mem.getint8(pStSet + 56)
mem.setfloat(pStSet + 39, 1488.0)
mem.setint8(pStSet + 47, 0)
mem.setint8(pStSet + 56, 1)
end
function nameTagOff()
local pStSet = sampGetServerSettingsPtr()
mem.setfloat(pStSet + 39, NTdist)
mem.setint8(pStSet + 47, NTwalls)
mem.setint8(pStSet + 56, NTshow)
end
function wh()
act = not act
if act then
nameTagOn()
printStringNow('WH on!', 1000)
else
nameTagOff()
printStringNow('WH off!', 1000)
end
end