Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

VIP Grade problems

Currently Stoned !
Joined
Dec 6, 2011
Messages
879
Reaction score
108
got some problem while making VIP wall and other bugs..
check the image..

In LObby, cant see name before zmsg:
Ronny786 - VIP Grade problems - RaGEZONE Forums





and regarding vip wall :

I can add vip wall. i dont know what to place in command ?

if i do it CCF_ALL , everyone write on wall.. and if i write CCF_ADMIN, only admins can write, not even vip. tell me what to put there? to make only vips write on wal ?
This code below :
Code:
	_CC_AC("vipwall",			&ChatCmd_VipAnnounce,			CCF_ADMIN, ARGVNoMin, 1 , true,"/vipwall <Message>", "");
 
Good Guy George
Member
Joined
Apr 12, 2009
Messages
1,260
Reaction score
239
In the main void, if(zgetmyinfo()->getuseridgrade != vip) return;

Zgameclient::eek:nchannelchat post that for me
 
Upvote 0
Currently Stoned !
Joined
Dec 6, 2011
Messages
879
Reaction score
108
In the main void, if(zgetmyinfo()->getuseridgrade != vip) return;

Zgameclient::eek:nchannelchat post that for me


void ZGameClient::OnChannelChat(const MUID& uidChannel, char* szName, char* szChat,int nGrade)
{
if (GetChannelUID() != uidChannel) return;
if ((szChat[0]==0) || (szName[0] == 0)) return;

// MUID uid = GetObject(szName);
// MMatchObjectCache* pObjCache = FindObjCache(uid);
MCOLOR _color = MCOLOR(0,0,0);

MMatchUserGradeID gid = (MMatchUserGradeID) nGrade;
// gid = MMUG_DEVELOPER;

char sp_name[256];

bool bSpUser = GetUserGradeIDColor(gid,_color,sp_name);

char szText[512];

if(bSpUser) // Ư¼öÀ¯Àú
{
wsprintf(szText, "%s : %s", sp_name , szChat);
ZChatOutput(szText, ZChat::CMT_NORMAL, ZChat::CL_LOBBY,_color);
}
else if ( !ZGetGameClient()->GetRejectNormalChat() || // ÀÏ¹Ý À¯Àú
(strcmp( szName, ZGetMyInfo()->GetCharName()) == 0))
{
wsprintf(szText, "^4%s : %s", szName, szChat);
ZChatOutput(szText, ZChat::CMT_NORMAL, ZChat::CL_LOBBY);
}
}

i already tried to do that.. but still doesnt work !
see this :
void ChatCmd_VipAnnounce(const char* line, const int argc, char **const argv) //ADMINPOSTARGSCMD
{
if(ZGetMyInfo()->GetUGradeID() == MMUG_VIP7 || MMUG_VIP8 || MMUG_VIP9 || MMUG_VIP10)
{
if (argc < 2)
{
OutputCmdWrongArgument(argv[0]);
return;
}
static unsigned long int st_nLastTime = 0;
unsigned long int nNowTime = timeGetTime();
#define DELAY 1200000 //second * 1000(milliseconds)

if ((nNowTime-st_nLastTime) < DELAY) return;
st_nLastTime = nNowTime;
char szMsg[256];
char szText[512];
strcpy(szMsg,argv[1]);
ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_CHAT);
}
}
 
Last edited:
Upvote 0
Back
Top