Hello,
I'm trying to make the same functions as CS:S in CS:GO,
I tried with this:
Code:
stock HudMsgCsgo(client, channel, Float:x, Float:y, const firstcolor[4], const secondcolor[4], effect, Float:fadein, Float:fadeout, Float:holdtime, Float:fxtime, const String:msg[], any:...)
{
new Handle:hudhandle = INVALID_HANDLE;
if(client == 0) hudhandle = StartMessageAll("HudMsg");
else hudhandle = StartMessageOne("HudMsg", client);
new String:texte[255];
VFormat(texte, sizeof(texte), msg, 13);
if(hudhandle != INVALID_HANDLE)
{
PbAddInt(hudhandle, "channel", channel);
new Float:pos[2]; pos[0] = x; pos[1] = y;
PbAddVector2D(hudhandle, "pos", pos);
PbAddColor(hudhandle, "clr1", firstcolor);
PbAddColor(hudhandle, "clr2", secondcolor);
PbAddInt(hudhandle, "effect", effect);
PbAddFloat(hudhandle, "fade_in_time", fadein);
PbAddFloat(hudhandle, "fade_out_time", fadeout);
PbAddFloat(hudhandle, "holdtime", holdtime);
PbAddFloat(hudhandle, "fx_time", fxtime);
PbAddString(hudhandle, "text", msg);
EndMessage();
}
}
I found the params name from a dll file in the CSGO folder (client.dll or server.dll) (my npp love opening a dll file):
Code:
CCSUsrMsg_HudMsg
channel (
pos (2
.CMsgVector2D
clr1 (2 .CMsgRGBA
clr2 (2 .CMsgRGBA
effect (
fade_in_time (
fade_out_time (
hold_time (
fx_time
(
text ( "`
When it executes the code, this error is thrown:
[SM] Native "PbAddInt" reported: Invalid field "channel" for message "CCSUsrMsg_HudMsg"
Any idea to fix this ?
thanks in advance
__________________