$$ACTION Misc Show HUD message [s:Message] aShowHUDMessage Show HUD message Shows a HUD message for all players Parameters: Message: The message to show $$END */
| 1218 | $$END |
| 1219 | */ |
| 1220 | void aShowHUDMessage(const char *format, ...) { |
| 1221 | msafe_struct mstruct; |
| 1222 | va_list args; |
| 1223 | |
| 1224 | va_start(args, format); |
| 1225 | std::vsnprintf(mstruct.message, sizeof(mstruct.message) - 1, format, args); |
| 1226 | va_end(args); |
| 1227 | mstruct.message[sizeof(mstruct.message) - 1] = 0; // if message too long, vsnprintf() won't terminate |
| 1228 | |
| 1229 | mstruct.state = 0; // means all players |
| 1230 | mstruct.color = GR_RGB(0, 255, 0); |
| 1231 | |
| 1232 | MSafe_CallFunction(MSAFE_MISC_HUD_MESSAGE, &mstruct); |
| 1233 | } |
| 1234 | |
| 1235 | /* |
| 1236 | $$ACTION |
no test coverage detected