Admin wall message confirmer.
Let's make this forum active again
ZChat_Cmds.cpp
Code:
void ChatCmd_AdminAnnounce(const char* line, const int argc, char **const argv)
{
if (argc < 2)
{
OutputCmdWrongArgument(argv[0]); return;
}
char szConfirm[1500];
sprintf(szConfirm,"^1Announce: ^2%s ?",argv[1]);
memcpy(ZGetConfiguration()->GetEtc()->szAnnounce, argv[1], sizeof(argv[1]) + 64);
ZApplication::GetGameInterface()->ShowConfirmMessage(szConfirm, ZGetPostAdminWall());
}
ZConfiguration.h
Code:
struct ZCONFIG_ETC{
char szAnnounce[1500];
};
#define Z_ETC_ANNOUNCE (ZGetConfiguration()->GetEtc()->szAnnounce)
InterfaceListener.cpp
Code:
class ZPostAdminWall : public MListener{
public:
virtual bool OnCommand(MWidget* pWidget, const char* szMessage){
if(MWidget::IsMsg(szMessage, MMSGBOX_YES)== true){
char szMsg[1000];
sprintf(szMsg,"%s : %s",ZGetMyInfo()->GetCharName(),ZGetConfiguration()->GetEtc()->szAnnounce);
ZPostAdminAnnounce(ZGetGameClient()->GetPlayerUID(), szMsg, ZAAT_CHAT);
} else {
}
pWidget->Show(false);
return false;
}
} g_ConfirmAdminWall;
MListener* ZGetPostAdminWall()
{
return &g_ConfirmAdminWall;
}
ZInterfaceListener.h
Code:
DECLARE_LISTENER(ZGetPostAdminWall);
http://i.imgur.com/BbduB.jpg
http://i.imgur.com/J8Xtg.jpg
Re: Admin wall message confirmer.
Actually kind of usefull, double checking your grammer n shit :D
Re: Admin wall message confirmer.
Nice releasse, ill use it xD
+1
Re: Admin wall message confirmer.
Thank you bro, I'll use it, keep releasing cuz I like your releases :)
Re: Admin wall message confirmer.
does is say how many people clicked yes /no?
Re: Admin wall message confirmer.
Re: Admin wall message confirmer.
Quote:
Originally Posted by
george3
Freestylegunz has it...
what then?
Re: Admin wall message confirmer.
Quote:
Originally Posted by
bulli10
does is say how many people clicked yes /no?
How is this question even relevant... Only 1 person can click yes/no and thats the person that uses admin_wall...
Re: Admin wall message confirmer.
Re: Admin wall message confirmer.
Re: Admin wall message confirmer.
Quote:
Originally Posted by
Elian
How is this question even relevant... Only 1 person can click yes/no and thats the person that uses admin_wall...
i meant if is count the votes?
Re: Admin wall message confirmer.
Quote:
Originally Posted by
bulli10
i meant if is count the votes?
It's just if you want to be sure that you want to send this message to public.
Re: Admin wall message confirmer.
i'm realy like this confurm before the wall send
nice idea
- Tankado
Re: Admin wall message confirmer.
Quote:
Originally Posted by
bulli10
i meant if is count the votes?
What votes... If you put this in your client and you want to announce something you type /admin_wall *text*
When you press answer this box will popup and will ask you if you want it to be announced or not. If the message is correct you just press OK and it will be announced. ONLY YOU CAN SEE THAT BOX. No need for voting if there is only 1 person that can see it.
Understand? Great.
Re: Admin wall message confirmer.
Quote:
Originally Posted by
Elian
What votes... If you put this in your client and you want to announce something you type /admin_wall *text*
When you press answer this box will popup and will ask you if you want it to be announced or not. If the message is correct you just press OK and it will be announced. ONLY YOU CAN SEE THAT BOX. No need for voting if there is only 1 person that can see it.
Understand? Great.
no try again please ...