muphet
New Member
- Joined
- Apr 27, 2008
- Messages
- 233
- Reaction score
- 2
Hi. I have a script which changing player's group, but it working only one time..
That one working. When player is in group 2 and he use spell of this code:
server do nothing.. What I need to do?
And, how to add an effects to this spell? When I add effects like
CONST_ME_MAGIC_RED, nothing appear..
this function changing group id, and 2nd group have own flags.
Help!
Code:
function onCastSpell(cid, var)
if getPlayerVocation(cid) == X then
if getPlayerGroupId(cid) == 1 then
setPlayerGroupId(cid,2)
end
else
doPlayerSendCancel(cid, "Sorry, you cannot use this ability.")
end
end
Code:
function onCastSpell(cid, var)
if getPlayerVocation(cid) == X then
if getPlayerGroupId(cid) == 2 then
setPlayerGroupId(cid,1)
end
else
doPlayerSendCancel(cid, "Sorry, you cannot use this ability.")
end
end
And, how to add an effects to this spell? When I add effects like
CONST_ME_MAGIC_RED, nothing appear..
this function changing group id, and 2nd group have own flags.
Help!