Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function onSay(cid, words, param)
- t = string.explode(param, ",")
- pid = getPlayerByName(t[1])
- r = tonumber(t[2])
- if not pid then
- doPlayerSendCancel(cid, "Player nao existente ou nao está online.")
- return true
- end
- if not r then
- doPlayerSendCancel(cid, "Somente numeros para reputaçao.")
- return true
- end
- if getPlayerStorageValue(cid, 12512) < os.time() then
- doPlayerSendCancel(cid, "Voce nao tem reps para adicionar.")
- return true
- end
- if r > 2 then
- doPlayerSendCancel(cid, "O Maximo de rep que voce pode adicionar é 2")
- setPlayerStorageValue(cid, 12512, os.time() + 1000 * 60 * 60 * 24)
- return true
- end
- setPlayerStorageValue(pid, 12513, r)
- doPlayerSendTextMessage(pid, 27, "Voce recebeu "..r.." reps do "..cid)
- if t[1] == "check" then
- doPlayerSendTextMessage(cid, 27, "Voce tem "..getPlayerStorageValue(cid, 12513).." reps")
- return true
- end
- return true
- end
- -- Comandos : /rep PlayerName, reps = /rep OrochiElf, 2
- -- Comando Check = /rep check
Advertisement
Add Comment
Please, Sign In to add comment