- changed TextMsg to return a bool
- fixed a bug where you couldn't send messages from post hooks - added protection in functions which expect StartMessage to succeed --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401138
This commit is contained in:
@@ -284,7 +284,10 @@ static cell_t PrintToChat(IPluginContext *pContext, const cell_t *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_HL2.TextMsg(client, HUD_PRINTTALK, buffer);
|
||||
if (!g_HL2.TextMsg(client, HUD_PRINTTALK, buffer))
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not send a usermessage");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
@@ -315,7 +318,10 @@ static cell_t PrintCenterText(IPluginContext *pContext, const cell_t *params)
|
||||
return 0;
|
||||
}
|
||||
|
||||
g_HL2.TextMsg(client, HUD_PRINTCENTER, buffer);
|
||||
if (!g_HL2.TextMsg(client, HUD_PRINTCENTER, buffer))
|
||||
{
|
||||
return pContext->ThrowNativeError("Could not send a usermessage");
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user