require "lib.moonloader"
local sampev = require("samp.events")
local vkeys = require 'vkeys'
if isKeyDown(VK_MENU) and isKeyJustPressed(VK_F2) then
local valid, ped = getCharPlayerIsTargeting(PLAYER_HANDLE)
if valid and doesCharExist(ped) then
local result, id = sampGetPlayerIdByCharHandle(ped)
if result then
sampSendChat("ok")
wait(200) sampSendChat("/ant "..id)
end
end
end
I have this code, it loads into moonloader successfully, but the F2 button dosent work. Its a simple script i know but, I'm new for this shit so please help..