Hello guys,
This script listed below show you how many kill and deaths that player has.
as I said, follow:
I want to gather these informations and say in broadcast.. Who is the better player online. Like a rank of serial killers. Someone knows what Im trying to say? But make a rank with the same informations that this script show you at the moment that the player looks to each other.
This script listed below show you how many kill and deaths that player has.
as I said, follow:
PHP:
function onLook(cid, thing, position, lookDistance)
function getDeathsAndKills(cid, type) -- by vodka
local query,d = db.getResult("SELECT `player_id` FROM "..(tostring(type) == "kill" and "`player_killers`" or "`player_deaths`").." WHERE `player_id` = "..getPlayerGUID(cid)),0
if (query:getID() ~= -1) then
repeat
d = d+1
until not query:next()
query:free()
end
return d
end
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, "\n"..(getPlayerSex(thing.uid) == 0 and "She" or "He").." has killed "..getDeathsAndKills(thing.uid, "kill").." players and died "..getDeathsAndKills(thing.uid, "death").." times")
end
return true
end
I want to gather these informations and say in broadcast.. Who is the better player online. Like a rank of serial killers. Someone knows what Im trying to say? But make a rank with the same informations that this script show you at the moment that the player looks to each other.