How can i do one Premium Channel?
have one tag to add in channels.xml to only Premium Players open it?
Solution: All credits goes to Cykotitan.
have one tag to add in channels.xml to only Premium Players open it?
Solution: All credits goes to Cykotitan.
In chat.cpp
Find:
[cpp] if((readXMLString(p, "logged", strValue) || readXMLString(p, "log", strValue)) && booleanString(strValue))
flags |= CHANNELFLAG_LOGGED;[/cpp]
Add this under it:
[cpp] if(readXMLString(p, "premium", strValue) && booleanString(strValue))
flags |= CHANNELFLAG_PREMIUM;[/cpp]
Find:
[cpp] player->getVocationId())))[/cpp]
Replace it with this:
[cpp] player->getVocationId())) || (tmpChannel->hasFlag(CHANNELFLAG_PREMIUM) && !player->isPremium()))[/cpp]
In chat.h
Find:
[cpp] CHANNELFLAG_LOGGED = 1 << 2,[/cpp]
Add this under it:
[cpp] CHANNELFLAG_PREMIUM = 1 << 3,[/cpp]
One of the easiest source edits, ever .
Oh, and to implement the channel into the server, add something like this in data/XML/channels.xml:
XML:<channel id="10" name="Premium Channel" premium="yes"/>
Last edited by a moderator: