Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Max players constant
- #define MAX_PLAYERS 64
- // Zandronum's unique event script
- script "main event script" (int type, int arg1, int arg2) EVENT
- {
- switch (type)
- {
- // Player sends a chat message
- case GAMEEVENT_CHAT:
- // Variables used
- int playerId = arg1;
- str message = arg2;
- // Full message that's send as a fake chat message
- str fullMessage = StrParam(n:playerId-1, s:": ", s:message);
- for (int i = 0; i < MAX_PLAYERS; ++i)
- {
- // Is the player i near the player that triggered the event script?
- if (!playerIsNearChatter(i, playerId)) {
- continue;
- }
- // This will log to a specific player (function not included since this is just an example)
- LogTo(i, fullMessage);
- }
- terminate;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement