Debugz Posted October 17, 2008 Report Posted October 17, 2008 (edited) !@#$%^&*o, Can someone tell me how I would go about programming a mervbot plugin to pm information to a specific name? For example: sendPrivate(p,"text") How do I make p point to someone based only on their name? Edited October 17, 2008 by Debugz
Debugz Posted October 17, 2008 Author Report Posted October 17, 2008 _listnode <Player> *parse = playerlist->head; while (parse) { Player *p = parse->item; if (p->name == "bob") sendPrivate(p,"HEY BOB!"); parse = parse->next; } Am I getting close? Or is there an easier way? Since the name wont change, I figured there would be a way to just to sendprivate to a variable, but so far i haven't been able to figure it out.
Samapico Posted October 17, 2008 Report Posted October 17, 2008 There's another function you can use, it's something like SendRemotePrivate(char * name, char * msg)It's equivalent to pm'ing someone with :Debugz:hey there, what's up
Recommended Posts