viewing paste Unknown #6750 | C

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/* sample packet implementation */
/* cmd 0xf3 - it is a client-server existent id, for clif_parse_GlobalMessage */
/* in this sample we do nothing and simply redirect */
void sample_packet0f3(int fd) {
        struct map_session_data *sd = session[fd]->session_data;
       
        ShowInfo("sample_packet008c: Hello World! received 0xf3 for '%s', redirecting!\n",sd->status.name);
       
        clif->pGlobalMessage(fd,sd);
}
...
plugin_init() {
        /* map-server interfaces */
        clif = GET_SYMBOL("clif");
       
        /* session[] */
        session = GET_SYMBOL("session");
 
        HPMi->addPacket(0xf3,-1,sample_packet0f3,hpClif_Parse,HPMi->pid);
}
Viewed 250 times, submitted by unknown.