Welcome!

Join our community of MMORPG enthusiasts and private server developers! By registering, you'll gain access to in-depth discussions on source codes, binaries, and the latest developments in MMORPG server files. Collaborate with like-minded individuals, explore tutorials, and share insights on building and optimizing private servers. Join us today and unlock the full potential of MMORPG server development!

Join Today!

VIP Grade problems

Currently Stoned !
Joined
Dec 6, 2011
Messages
879
Reaction score
108
Location
Lost World
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>", "");
 
In the main void, if(zgetmyinfo()->getuseridgrade != vip) return;

Zgameclient::onchannelchat 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