Procure no script de talkaction a linha onde esta assim:
doPlayerAddMoney(winner, getGlobalStorageValue(30001))
Em baixo disto adicione:
setPlayerStorageValue(winner, 30003, getPlayerStorageValue(winner, 30003) + 1)
Feito isso, crie um arquivo .lua chamado gamerank e cole isto nele:
function onSay(cid, words, param)
t = {}
b = {}
n = 0
str = nil
str2 = ""
for i, pid in ipairs(getPlayersOnline()) do
t[i] = getPlayerStorageValue(pid, 30003) + 1
end
doShowTextDialog(cid, 2160, getString(t))
end
function getString(t)
b = {}
for w, z in ipairs(getPlayersOnline()) do
b[w] = order(t)
e = getName().. " " .. b[w]
str = str == nil and e or str.. "\n" .. e
table.remove(t, table.find(t, n))
end
return str
end
function getName()
for s, d in ipairs(getPlayersOnline()) do
if order(t) == getPlayerStorageValue(d, 30003) + 1 and not(string.find(str2, getCreatureName(d))) then
str2 = str2 == "" and getCreatureName(d) or str2..getCreatureName(d)
p = getCreatureName(d)
break
end
end
return p
end
function order(t)
n = 0
for y, x in ipairs(t) do
if x > n then
n = x
end
end
return n
end
Por ultimo, vá em talkactions.xml e cole esta tag em algum lugar:
<talkaction words="!gamerank" script="gamerank.lua" />
Pronto, rank criado.




info
Grupo: Campones
Registrado: 27/11/08
Posts: 8
Reputação: 0
tem como fazer um rank? tipo bota uma BlackBoart do lado falando o TOP 3 dos players que mais vencenram?