Só adicionar essa variável?
Tipo assim?
function onSay(cid, words, param, channel)
local t = param:explode(",")
local player = getPlayerByName(t[1])
if param == "" then
return doPlayerSendCancel(cid, "Command requires param.")
elseif not isPlayer(player) then
return doPlayerSendCancel(cid, "Sorry, not possible.")
end
if getPlayerVipPoints(cid) < 20 then
return doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce nao tem pontos suficiente!!")
end
doPlayerRemoveVipPoints(cid, 20)
doPlayerAddVipPoints(player, 20)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce Transferiu 20 pontos para "..getPlayerName(player)..".")
f = io.open("data/logs/Pontos.txt", "a+")
f:write("Player: "..getPlayerName(cid).." transferiu pontos para "..getPlayerName(player).."\n\n----------------------------------------------------------\n")
f:close()
return true
end




info
Grupo: Campones
Registrado: 08/01/07
Posts: 58
Reputação: +3
Ae Galera queria ajuda em 1 script que eu tenho... resumindo ele transfere vip points de 1 account para outra, porem não consegui fazer o comando local "local t = string.explode(param, ",")" alguem poderia adicionar isso para mim ?
function onSay(cid, words, param, channel) if isPlayer(cid) then if(param == "") then doPlayerSendCancel(cid, "Command requires param.") return TRUE end local player = getPlayerByNameWildcard(param) local pid = getPlayerByNameWildcard(param) local players = getPlayerName(player) if(getPlayerVipPoints(cid) < 20) then doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "Voce nao tem pontos suficiente!!") return true end if isPlayer(player) == TRUE then doPlayerRemoveVipPoints(cid, 20) doPlayerAddVipPoints(pid, 20) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Voce Transferiu 20 pontos para "..players..".") f = io.open("data/logs/Pontos.txt", "a+") f:write("Player: "..getPlayerName(cid).." transferiu pontos para "..players.."\n\n----------------------------------------------------------\n") f:close() else doPlayerSendCancel(cid, "This player is not online.") end end return TRUE endObg