script_name("Player info")
script_version_number(1)
script_version("1.1")
script_author("RollUp")
function main()
while not isSampAvailable() do wait(200) end
x, y = getScreenResolution()
font = renderCreateFont("stepa", 10, 12)
while true do
wait(0)
res, handle = getCharPlayerIsTargeting(playerHandle)
if res and not isKeyDown(119) then
resid, id = sampGetPlayerIdByCharHandle(handle)
color = sampGetPlayerColor(id)
name = sampGetPlayerNickname(id)
weapon = getCurrentCharWeapon(handle)
weap = getweaponname(weapon)
health = sampGetPlayerHealth(id)
armor = sampGetPlayerArmor(id)
ping = sampGetPlayerPing(id)
score = sampGetPlayerScore(id)
renderFontDrawText(font,string.format("{848484}Nickname: {FA5882}%s[%d]\n{848484}Hp/Ap: {FA5882}%d/%d\n{848484}Lvl: {FA5882}%d\n{848484}Ping: {FA5882}%d\n{848484}Weapon: {FA5882}%s", name, id, health, armor, score, ping, weap) ,x/2.2, y/1.8, color)
end
end
end
function getweaponname(weapon)
local names = {
[0] = "Fist",
[1] = "Brass Knuckles",
[2] = "Golf Club",
[3] = "Nightstick",
[4] = "Knife",
[5] = "Baseball Bat",
[6] = "Shovel",
[7] = "Pool Cue",
[8] = "Katana",
[9] = "Chainsaw",
[10] = "Purple Dildo",
[11] = "Dildo",
[12] = "Vibrator",
[13] = "Silver Vibrator",
[14] = "Flowers",
[15] = "Cane",
[16] = "Grenade",
[17] = "Tear Gas",
[18] = "Molotov Cocktail",
[22] = "9mm",
[23] = "Silenced 9mm",
[24] = "Desert Eagle",
[25] = "Shotgun",
[26] = "Sawnoff Shotgun",
[27] = "Combat Shotgun",
[28] = "Micro SMG/Uzi",
[29] = "MP5",
[30] = "AK-47",
[31] = "M4",
[32] = "Tec-9",
[33] = "Country Rifle",
[34] = "Sniper Rifle",
[35] = "RPG",
[36] = "HS Rocket",
[37] = "Flamethrower",
[38] = "Minigun",
[39] = "Satchel Charge",
[40] = "Detonator",
[41] = "Spraycan",
[42] = "Fire Extinguisher",
[43] = "Camera",
[44] = "Night Vis Goggles",
[45] = "Thermal Goggles",
[46] = "Parachute" }
return names[weapon]
end