Server Help

ASSS Custom Projects - Toggle lvz object

Smong - Sat Apr 12, 2003 10:06 am
Post subject: Toggle lvz object
Code: Show/Hide

struct ObjectPacket
{
   u8 pktype;
   unsigned lid : 15; //From lvzFormat.txt
   unsigned reserved : 1; //Align
};

local void sendLvzObject(Player *p, int id) {
   int size = 3;
   struct ObjectPacket *pkt;

   pkt->pktype = 0x35;
   pkt->lid    = id & 0x7FFF; //Mask for 15 bits
   if (net) net->SendToOne(p, (byte*)pkt, size, NET_RELIABLE);
}


This works for ctm, but the catch is that it crashes Asss icon_redface.gif
Grelminar - Sat Apr 12, 2003 9:46 pm
Post subject:
Please look at the existing code before you start writing stuff. There already is a module that does everything you might want to do with objects. It's called, strangely enough, "objects".

And please make sure your code is right before you imply that there's something wrong with mine. Did you notice that your "pkt" doesn't point to anything?
Smong - Sun Apr 13, 2003 6:05 am
Post subject:
Oops ~delete delete delete~
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group