kimokimo
Kimo
i want to add this effect
to this bless script
like when player buy bless it send him this effect
PHP:
for i = 1, table.maxn(config) do
local pos = {x=config[i].x,y=config[i].y,z=config[i].z}
for x = -1, 1 do
for y = -1, 1 do
if(x ~= 0 and y ~= 0) then
for i = 1, 1 do
doSendDistanceShoot(pos, {x = pos.x + x * i, y = pos.y + y * i, z = pos.z}, 28)
end
doSendDistanceShoot(pos, {x = pos.x + x * 1, y = pos.y + y * 1, z = pos.z}, 35) --
--doSendMagicEffect({x = pos.x + x * 6, y = pos.y + y * 6, z = pos.z}, CONST_ME_FIREAREA)
end
end
end
if config[i].effect ~= nil then
doSendMagicEffect(pos, config[i].effect)
to this bless script
PHP:
local cfg = {
bless = { 1, 2, 3, 4, 5 },
cost = 50000
}
function onSay(cid, words, param, channel)
for i = 1, table.maxn(cfg.bless) do
if(getPlayerBlessing(cid, cfg.bless[i])) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doCreatureSay(cid, "You have already been blessed.", TALKTYPE_ORANGE_1)
return true
end
end
if (getPlayerMoney(cid) < cfg.cost) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
doSendAnimatedText(getCreaturePosition(cid), "$$$", TEXTCOLOR_WHITE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You do not have enough money.")
elseif(doPlayerRemoveMoney(cid, cfg.cost) == TRUE) then
for i = 1, table.maxn(cfg.bless) do
doPlayerAddBlessing(cid, cfg.bless[i])
end
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
end
return true
end
like when player buy bless it send him this effect