SHOWLMP or how to draw images on the client from server

2023-07-13 QuakeC tutorials kleskby 0 160
Author: kleskby


Do not use this if you are running modern source port. Use CSQC instead.


float SVC_SHOWLMP = 35;
float SVC_HIDELMP = 36;

void(string indexname, string picname, float x, float y) ShowLmp=
{
 msg_entity = self;
 WriteByte (MSG_ONE, SVC_SHOWLMP);
 WriteString(MSG_ONE,indexname);
 WriteString(MSG_ONE,picname);
 WriteShort(MSG_ONE,x);
 WriteShort(MSG_ONE,y);
}
 
void(string indexname) HideLmp=
{
 msg_entity = self;
 WriteByte (MSG_ONE, SVC_HIDELMP);
 WriteString(MSG_ONE,indexname);
}

 

Use:

ShowLmp("loa1","gfx/icon_inv.png",20,50); // to draw

HideLmp("loa1"); // to hide when done



Tags: tutorial, qc, quakec, quake
Owned by kleskby#1837
Telegram
Close

You have no new notifications.


You have no new messages.