• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

how i can put this effect to my bless script?

kimokimo

Kimo
Joined
Jan 25, 2011
Messages
821
Solutions
6
Reaction score
156
GitHub
karimadnan
i want to add 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
 
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)) 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)
end
doSendDistanceShoot(pos, {x = pos.x + x * i, y = pos.y + y * i, z = pos.z}, 28)
doSendMagicEffect({x = pos.x + x * 6, y = pos.y + y * 6, z = pos.z}, CONST_ME_FIREAREA)
doSendAnimatedText(getCreaturePosition(cid), "BLESSED!", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been blessed by the gods.")
end
return true
end



idk.. tell errors or what ever it iss that dont work-
 
Back
Top