Nubaza
LUA Scripter
Hello!
I tried to do a channel by storage but i can't do that.
So... i read this from a post:
But.. What about to do for "storage" and not for "premium" ???
Something like: <channel id="10" name="X Channel" storageid="11740"/>
So... just if the player have the storageid "x" in value 1 can see that channel.
I tried changing that line:
player->isPremium()))
to
player->getStorage()))
but didn't worked
Please help, thanks.
I tried to do a channel by storage but i can't do that.
So... i read this from a post:
Code:
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.
In chat.cpp
Find:
if((readXMLString(p, "logged", strValue) || readXMLString(p, "log", strValue)) && booleanString(strValue))
flags |= CHANNELFLAG_LOGGED;
Add this under it:
if(readXMLString(p, "premium", strValue) && booleanString(strValue))
flags |= CHANNELFLAG_PREMIUM;
Find:
player->getVocationId())))
Replace it with this:
player->getVocationId())) || (tmpChannel->hasFlag(CHANNELFLAG_PREMIUM) && !player->isPremium()))
In chat.h
Find:
CHANNELFLAG_LOGGED = 1 << 2,
Add this under it:
CHANNELFLAG_PREMIUM = 1 << 3,
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:
<channel id="10" name="Premium Channel" premium="yes"/>
But.. What about to do for "storage" and not for "premium" ???
Something like: <channel id="10" name="X Channel" storageid="11740"/>
So... just if the player have the storageid "x" in value 1 can see that channel.
I tried changing that line:
player->isPremium()))
to
player->getStorage()))
but didn't worked
Please help, thanks.
Last edited: