vexler222
Active Member
- Joined
- Apr 22, 2012
- Messages
- 714
- Solutions
- 15
- Reaction score
- 46
Hi, i have problem with talkactions command from snowball event, when i try use !snowball info to check rank/info abaut snowball i got client crash, when i trying use command to shot snowball i dont see any effect, i can kill player only if he stay close me, and it dont give me points
And i have error:
And i have error:
Code:
function onSay(player, words, param)
if not isInArena(player) then
return false
end
if param == SNOWBALL.comandoAtirar then
if not SNOWBALL.muniInfinito then
if player:getStorageValue(10108) > 0 then
player:setStorageValue(10108, player:getStorageValue(10108) - 1)
player:sendCancelMessage(SNOWBALL.prefixo .. (SNOWBALL.mensagemQntBolas):format(player:getStorageValue(10108)))
else
player:sendCancelMessage(SNOWBALL.prefixo .. SNOWBALL.mensagemNaoTemBola)
return true
end
end
enviarSnowball(player:getId(), player:getPosition(), SNOWBALL.muniDistancia, player:getDirection())
return false
elseif param == "info" then
local str = " ## -> Player Infos <- ##\n\nPontos: ".. player:getStorageValue(10109) .."\nBolas de neve: ".. player:getStorageValue(10108)
str = str .. "\n\n ## -> Ranking <- ##\n\n"
for i = 1, 5 do
if CACHE_GAMEPLAYERS[i] then
str = str .. i .. ". " .. Player(CACHE_GAMEPLAYERS[i]):getName() .."\n"
end
end
for pos, players in ipairs(CACHE_GAMEPLAYERS) do
if player:getId() == players then
str = str .. "Minha posição no ranking: " .. pos
end
end
player:showTextDialog(2111, str)
return false
end
end