commit
8af6d44e68
@ -422,7 +422,7 @@ thread OnPlayerUnbanIP( playerid, irc, address[ ] )
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "**(UNBANNED)** IP %s has been un-banned from the server.", address );
|
DCC_SendChannelMessageFormatted( discordLogChan, "**[DISCORD LOG]** IP %s has been un-banned from the server.", address );
|
||||||
}
|
}
|
||||||
format( szNormalString, sizeof( szNormalString ), "DELETE FROM `BANS` WHERE `IP` = '%s'", mysql_escape( address ) );
|
format( szNormalString, sizeof( szNormalString ), "DELETE FROM `BANS` WHERE `IP` = '%s'", mysql_escape( address ) );
|
||||||
mysql_single_query( szNormalString );
|
mysql_single_query( szNormalString );
|
||||||
@ -461,8 +461,8 @@ thread OnPlayerUnbanPlayer( playerid, irc, player[ ] )
|
|||||||
if ( !irc ) AddAdminLogLineFormatted( "%s(%d) has un-banned %s", ReturnPlayerName( playerid ), playerid, player );
|
if ( !irc ) AddAdminLogLineFormatted( "%s(%d) has un-banned %s", ReturnPlayerName( playerid ), playerid, player );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
format(szNormalString, sizeof(szNormalString),"**(UNBANNED)** %s has been un-banned from the server.", player);
|
format(szNormalString, sizeof(szNormalString),"**[DISCORD LOG]** %s has been un-banned from the server.", player);
|
||||||
DCC_SendChannelMessage( discordGeneralChan, szNormalString );
|
DCC_SendChannelMessage( discordLogChan, szNormalString );
|
||||||
}
|
}
|
||||||
format(szNormalString, sizeof(szNormalString), "DELETE FROM `BANS` WHERE `NAME` = '%s'", mysql_escape( player ) );
|
format(szNormalString, sizeof(szNormalString), "DELETE FROM `BANS` WHERE `NAME` = '%s'", mysql_escape( player ) );
|
||||||
mysql_single_query( szNormalString );
|
mysql_single_query( szNormalString );
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -5,38 +5,55 @@
|
|||||||
* Purpose: discord implementation in-game
|
* Purpose: discord implementation in-game
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define DISCORD_DISABLED // !!!! DISABLED BY DEFAULT !!!!
|
//#define DISCORD_DISABLED // !!!! DISABLED BY DEFAULT !!!!
|
||||||
|
|
||||||
/* ** Includes ** */
|
/* ** Includes ** */
|
||||||
#include < YSI\y_hooks >
|
#include < YSI\y_hooks >
|
||||||
//#include < discord-connector >
|
#include < discord-connector >
|
||||||
|
|
||||||
/* ** Definitions ** */
|
/* ** Definitions ** */
|
||||||
#define DISCORD_GENERAL "191078670360641536"
|
/* Guild */
|
||||||
#define DISCORD_ADMINISTRATION "191078670360641536"
|
#define DISCORD_GUILD "571071428921655348"
|
||||||
#define DISCORD_SPAM "364725535256870913"
|
|
||||||
|
|
||||||
#define DISCORD_ROLE_EXEC "191727949404176384"
|
/* Channels */
|
||||||
#define DISCORD_ROLE_HEAD "191134988354191360"
|
#define DISCORD_ADMIN_CHAN "578879515552382986"
|
||||||
#define DISCORD_ROLE_LEAD "191080382689443841"
|
#define DISCORD_LOG_CHAN "578879541838348308"
|
||||||
#define DISCORD_ROLE_VIP "191180697547833344"
|
#define DISCORD_CHAT_CHAN "578879608032722944"
|
||||||
#define DISCORD_ROLE_VOICE "364678874681966592"
|
#define DISCORD_COMMANDS_CHAN "578879719571849217"
|
||||||
|
#define DISCORD_ASK_CHAN "582137050602405918"
|
||||||
|
|
||||||
/* ** Macros ** */
|
/* Roles */
|
||||||
#define DQCMD:%1(%2) forward discord_%1(%2); public discord_%1(%2)
|
#define DISCORD_ROLE_EXEC "571072485617827870"
|
||||||
|
#define DISCORD_ROLE_DEV "578885173555232789"
|
||||||
|
#define DISCORD_ROLE_COUNCIL "571073680059269193"
|
||||||
|
#define DISCORD_ROLE_LEAD "571073881733857302"
|
||||||
|
#define DISCORD_ROLE_SENIOR "578885422822850560"
|
||||||
|
#define DISCORD_ROLE_GENERAL "578885496655052820"
|
||||||
|
#define DISCORD_ROLE_TRIAL "578885593988202496"
|
||||||
|
#define DISCORD_ROLE_SUPPORT "578885684979302419"
|
||||||
|
#define DISCORD_ROLE_VIP "571073955138502656"
|
||||||
|
#define DISCORD_ROLE_MEMBER "578886006783213597"
|
||||||
|
|
||||||
/* ** Variables ** */
|
/* ** Variables ** */
|
||||||
new stock
|
new stock
|
||||||
DCC_Guild: discordGuild,
|
DCC_Guild: discordGuild,
|
||||||
DCC_Channel: discordGeneralChan,
|
|
||||||
DCC_Channel: discordAdminChan,
|
|
||||||
DCC_Channel: discordSpamChan,
|
|
||||||
|
|
||||||
DCC_Role: discordRoleExecutive,
|
DCC_Channel: discordAdminChan,
|
||||||
DCC_Role: discordRoleHead,
|
DCC_Channel: discordLogChan,
|
||||||
|
DCC_Channel: discordChatChan,
|
||||||
|
DCC_Channel: discordCmdsChan,
|
||||||
|
DCC_Channel: discordAskChan,
|
||||||
|
|
||||||
|
DCC_Role: discordRoleExec,
|
||||||
|
DCC_Role: discordRoleDev,
|
||||||
|
DCC_Role: discordRoleCouncil,
|
||||||
DCC_Role: discordRoleLead,
|
DCC_Role: discordRoleLead,
|
||||||
|
DCC_Role: discordRoleSenior,
|
||||||
|
DCC_Role: discordRoleGeneral,
|
||||||
|
DCC_Role: discordRoleTrial,
|
||||||
|
DCC_Role: discordRoleSupport,
|
||||||
DCC_Role: discordRoleVIP,
|
DCC_Role: discordRoleVIP,
|
||||||
DCC_Role: discordRoleVoice
|
DCC_Role: discordRoleMember
|
||||||
;
|
;
|
||||||
|
|
||||||
stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va_args< > ) {
|
stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va_args< > ) {
|
||||||
@ -50,9 +67,9 @@ stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va
|
|||||||
#pragma unused message
|
#pragma unused message
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
stock DCC_SendUserMessage( DCC_User: user, const message[ ] )
|
stock DCC_SendUserMessage( DCC_User: author, const message[ ] )
|
||||||
{
|
{
|
||||||
#pragma unused user
|
#pragma unused author
|
||||||
#pragma unused message
|
#pragma unused message
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -60,104 +77,93 @@ stock DCC_SendChannelMessageFormatted( DCC_Channel: channel, const format[ ], va
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ** Hooks ** */
|
/* ** Hooks ** */
|
||||||
hook OnScriptInit( )
|
hook OnGameModeInit( )
|
||||||
{
|
{
|
||||||
discordGuild = DCC_FindGuildById( DISCORD_GENERAL );
|
discordGuild = DCC_FindGuildById( DISCORD_GUILD );
|
||||||
discordGeneralChan = DCC_FindChannelById( DISCORD_GENERAL );
|
|
||||||
discordSpamChan = DCC_FindChannelById( DISCORD_SPAM );
|
|
||||||
|
|
||||||
discordRoleExecutive = DCC_FindRoleById( DISCORD_ROLE_EXEC );
|
discordAdminChan = DCC_FindChannelById( DISCORD_ADMIN_CHAN );
|
||||||
discordRoleHead = DCC_FindRoleById( DISCORD_ROLE_HEAD );
|
discordLogChan = DCC_FindChannelById( DISCORD_LOG_CHAN );
|
||||||
discordRoleLead = DCC_FindRoleById( DISCORD_ROLE_LEAD );
|
discordChatChan = DCC_FindChannelById( DISCORD_CHAT_CHAN );
|
||||||
discordRoleVIP = DCC_FindRoleById( DISCORD_ROLE_VIP );
|
discordCmdsChan = DCC_FindChannelById( DISCORD_COMMANDS_CHAN );
|
||||||
discordRoleVoice = DCC_FindRoleById( DISCORD_ROLE_VOICE );
|
discordAskChan = DCC_FindChannelById( DISCORD_ASK_CHAN );
|
||||||
|
|
||||||
DCC_SendChannelMessage( discordGeneralChan, "**The discord plugin has been initiaized.**" );
|
discordRoleExec = DCC_FindRoleById ( DISCORD_ROLE_EXEC );
|
||||||
|
discordRoleDev = DCC_FindRoleById ( DISCORD_ROLE_DEV );
|
||||||
|
discordRoleCouncil = DCC_FindRoleById ( DISCORD_ROLE_COUNCIL );
|
||||||
|
discordRoleLead = DCC_FindRoleById ( DISCORD_ROLE_LEAD );
|
||||||
|
discordRoleSenior = DCC_FindRoleById ( DISCORD_ROLE_SENIOR );
|
||||||
|
discordRoleGeneral = DCC_FindRoleById ( DISCORD_ROLE_GENERAL );
|
||||||
|
discordRoleTrial = DCC_FindRoleById ( DISCORD_ROLE_TRIAL );
|
||||||
|
discordRoleSupport = DCC_FindRoleById ( DISCORD_ROLE_SUPPORT );
|
||||||
|
discordRoleVIP = DCC_FindRoleById ( DISCORD_ROLE_VIP );
|
||||||
|
discordRoleMember = DCC_FindRoleById ( DISCORD_ROLE_MEMBER );
|
||||||
|
|
||||||
|
DCC_SendChannelMessage( discordChatChan, "**Stephanie v1.0 is here.**" );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ** Commands ** */
|
|
||||||
CMD:discordpm( playerid, params[ ] )
|
|
||||||
{
|
|
||||||
new
|
|
||||||
msg[ 128 ];
|
|
||||||
|
|
||||||
if ( sscanf( params, "s[100]", msg ) ) SendUsage( playerid, "/discordpm [message]" );
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Beep( playerid );
|
|
||||||
format( msg, sizeof( msg ), "__[Discord PM]__ **%s(%d):** %s", ReturnPlayerName( playerid ), playerid, msg );
|
|
||||||
DCC_SendChannelMessage( discordGeneralChan, msg );
|
|
||||||
SendServerMessage( playerid, "Your typed message has been sent to the Discord #sfcnr channel!" );
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ** Functions ** */
|
/* ** Functions ** */
|
||||||
hook DCC_OnChannelMessage( DCC_Channel: channel, DCC_User: author, const message[ ] )
|
stock ReturnDiscordName( DCC_User: author ) {
|
||||||
{
|
|
||||||
// ignore outside of #sfcnr and #admin
|
|
||||||
if ( channel != discordGeneralChan && channel != discordAdminChan )
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
// process commands
|
|
||||||
if ( message[ 0 ] == '!' )
|
|
||||||
{
|
|
||||||
new
|
|
||||||
functiona[ 32 ], posi = 0;
|
|
||||||
|
|
||||||
while ( message[ ++posi ] > ' ' ) {
|
|
||||||
functiona[ posi - 1 ] = tolower( message[ posi ] );
|
|
||||||
}
|
|
||||||
|
|
||||||
format( functiona, sizeof( functiona ), "discord_%s", functiona );
|
|
||||||
|
|
||||||
while ( message[ posi ] == ' ' ) {
|
|
||||||
posi++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( ! message[ posi ] ) {
|
|
||||||
CallLocalFunction( functiona, "dds", _: channel, _: author, "\1" );
|
|
||||||
} else {
|
|
||||||
CallLocalFunction( functiona, "dds", _: channel, _: author, message[ posi ] );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
stock ReturnDiscordName( DCC_User: user ) {
|
|
||||||
static
|
static
|
||||||
name[ 32 ];
|
name[ 32 ];
|
||||||
|
|
||||||
DCC_GetUserName( user, name, sizeof( name ) );
|
DCC_GetUserName( author, name, sizeof( name ) );
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
stock discordLevelToString( DCC_User: user )
|
stock discordLevelToString( DCC_User: author )
|
||||||
{
|
{
|
||||||
static
|
static
|
||||||
szRank[ 12 ], bool: hasExecutive, bool: hasHead, bool: hasLead, bool: hasVIP;
|
szRank[ 15 ],
|
||||||
|
bool: hasExec, bool: hasDev, bool: hasCouncil, bool: hasLead, bool: hasSenior,
|
||||||
|
bool: hasGeneral, bool: hasTrial, bool: hasSupport, bool: hasVIP, bool: hasMember;
|
||||||
|
|
||||||
DCC_HasGuildMemberRole( discordGuild, user, discordRoleExecutive, hasExecutive );
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleExec, hasExec );
|
||||||
DCC_HasGuildMemberRole( discordGuild, user, discordRoleHead, hasHead );
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleDev, hasDev );
|
||||||
DCC_HasGuildMemberRole( discordGuild, user, discordRoleLead, hasLead );
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleCouncil, hasCouncil );
|
||||||
DCC_HasGuildMemberRole( discordGuild, user, discordRoleVIP, hasVIP );
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleLead, hasLead );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleSenior, hasSenior );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleGeneral, hasGeneral );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleTrial, hasTrial );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleSupport, hasSupport );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleVIP, hasVIP );
|
||||||
|
DCC_HasGuildMemberRole( discordGuild, author, discordRoleMember, hasMember );
|
||||||
|
|
||||||
if ( hasExecutive ) szRank = "Executive";
|
if ( hasExec ) szRank = "Executive";
|
||||||
else if ( hasHead ) szRank = "Head Admin";
|
else if ( hasDev ) szRank = "Developer";
|
||||||
|
else if ( hasCouncil ) szRank = "Council";
|
||||||
else if ( hasLead ) szRank = "Lead Admin";
|
else if ( hasLead ) szRank = "Lead Admin";
|
||||||
|
else if ( hasSenior ) szRank = "Senior Admin";
|
||||||
|
else if ( hasGeneral ) szRank = "General Admin";
|
||||||
|
else if ( hasTrial ) szRank = "Trial Admin";
|
||||||
|
else if ( hasSupport ) szRank = "Supporter";
|
||||||
else if ( hasVIP ) szRank = "VIP";
|
else if ( hasVIP ) szRank = "VIP";
|
||||||
else szRank = "Voice";
|
else if ( hasMember ) szRank = "Member";
|
||||||
|
|
||||||
return szRank;
|
return szRank;
|
||||||
}
|
}
|
||||||
|
|
||||||
stock DCC_SendUserMessage( DCC_User: user, const message[ ] )
|
stock DCC_SendUserUsage( DCC_User: author, const message[ ] )
|
||||||
{
|
{
|
||||||
static
|
static
|
||||||
user_id[ 64 ];
|
user_id[ 64 ];
|
||||||
|
|
||||||
DCC_GetUserId( user, user_id, sizeof( user_id ) );
|
DCC_GetUserId( author, user_id, sizeof( user_id ) );
|
||||||
format( szBigString, sizeof( szBigString ), "<@%s> ... %s", user_id, message );
|
format( szBigString, sizeof( szBigString ), "<@%s> %s", user_id, message );
|
||||||
return DCC_SendChannelMessage( discordSpamChan, szBigString );
|
return DCC_SendChannelMessage( discordCmdsChan, szBigString );
|
||||||
|
}
|
||||||
|
|
||||||
|
public OnDiscordCommandPerformed(DCC_Channel: channel, DCC_User: author, bool: success)
|
||||||
|
{
|
||||||
|
if (!success) {
|
||||||
|
return DCC_SendChannelMessage(channel, "**[ERROR]** You have entered an invalid command. To display the command list type !commands.");
|
||||||
|
}
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DCC_OnGuildMemberAdd(DCC_Guild:guild, DCC_User:user)
|
||||||
|
{
|
||||||
|
DCC_SendUserUsage(user, "Hey there! I am **Stephanie**, i am here to help you out!\nUse **!commands** to see all commands i offer.\nYou need to have **member** role trough to use them, so first verify your account!");
|
||||||
|
return 1;
|
||||||
}
|
}
|
@ -457,8 +457,8 @@ public OnLookupComplete( playerid, success )
|
|||||||
SendClientMessage( i, COLOR_CONNECT, szNormalString );
|
SendClientMessage( i, COLOR_CONNECT, szNormalString );
|
||||||
}
|
}
|
||||||
|
|
||||||
format( szNormalString, sizeof( szNormalString ), "*%s*", szNormalString );
|
//format( szNormalString, sizeof( szNormalString ), "*%s*", szNormalString );
|
||||||
DCC_SendChannelMessage( discordGeneralChan, szNormalString );
|
//DCC_SendChannelMessage( discordGeneralChan, szNormalString );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -628,8 +628,8 @@ public OnPlayerDisconnect( playerid, reason )
|
|||||||
p_BlockedPM[ playerid ] [ i ] = false;
|
p_BlockedPM[ playerid ] [ i ] = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
format( string, sizeof( string ), "*%s*", string );
|
//format( string, sizeof( string ), "*%s*", string );
|
||||||
DCC_SendChannelMessage( discordGeneralChan, string );
|
//DCC_SendChannelMessage( discordGeneralChan, string );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1243,7 +1243,7 @@ public OnPlayerDeath( playerid, killerid, reason )
|
|||||||
|
|
||||||
SendDeathMessage( killerid, playerid, reason );
|
SendDeathMessage( killerid, playerid, reason );
|
||||||
|
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has killed %s(%d) - %s!*", ReturnPlayerName( killerid ), killerid, ReturnPlayerName( playerid ), playerid, ReturnWeaponName( reason ) );
|
//DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has killed %s(%d) - %s!*", ReturnPlayerName( killerid ), killerid, ReturnPlayerName( playerid ), playerid, ReturnWeaponName( reason ) );
|
||||||
|
|
||||||
if ( !IsPlayerAdminOnDuty( killerid ) )
|
if ( !IsPlayerAdminOnDuty( killerid ) )
|
||||||
{
|
{
|
||||||
@ -1388,7 +1388,7 @@ public OnPlayerDeath( playerid, killerid, reason )
|
|||||||
else if ( IsPlayerNPC( killerid ) ) SendDeathMessage( killerid, playerid, reason );
|
else if ( IsPlayerNPC( killerid ) ) SendDeathMessage( killerid, playerid, reason );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has committed suicide!*", ReturnPlayerName( playerid ), playerid );
|
//DCC_SendChannelMessageFormatted( discordGeneralChan, "*%s(%d) has committed suicide!*", ReturnPlayerName( playerid ), playerid );
|
||||||
SendDeathMessage( INVALID_PLAYER_ID, playerid, 53 );
|
SendDeathMessage( INVALID_PLAYER_ID, playerid, 53 );
|
||||||
DeletePVar( playerid, "used_cmd_kill" );
|
DeletePVar( playerid, "used_cmd_kill" );
|
||||||
}
|
}
|
||||||
@ -1574,7 +1574,7 @@ public OnPlayerText( playerid, text[ ] )
|
|||||||
{
|
{
|
||||||
if ( p_VIPLevel[ playerid ] > 0 )
|
if ( p_VIPLevel[ playerid ] > 0 )
|
||||||
{
|
{
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "__**(VIP) %s(%d):**__ %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
|
DCC_SendChannelMessageFormatted( discordChatChan, "**[%s] (VIP) %s(%d):** %s", getCurrentTime(), ReturnPlayerName( playerid ), playerid, text[ 1 ] );
|
||||||
SendClientMessageToAllFormatted( 0x3eff3eff, "[VIP] %s(%d):{9ec34f} %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
|
SendClientMessageToAllFormatted( 0x3eff3eff, "[VIP] %s(%d):{9ec34f} %s", ReturnPlayerName( playerid ), playerid, text[ 1 ] );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -1591,7 +1591,7 @@ public OnPlayerText( playerid, text[ ] )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "**%s(%d):** %s", ReturnPlayerName( playerid ), playerid, text ); // p_Class[ playerid ] == CLASS_POLICE ? 12 : 4
|
DCC_SendChannelMessageFormatted( discordChatChan, "**[%s] %s(%d):** %s", getCurrentTime(), ReturnPlayerName( playerid ), playerid, text ); // p_Class[ playerid ] == CLASS_POLICE ? 12 : 4
|
||||||
|
|
||||||
// custom player id setting
|
// custom player id setting
|
||||||
foreach ( new iPlayer : Player ) {
|
foreach ( new iPlayer : Player ) {
|
||||||
@ -2207,7 +2207,7 @@ CMD:vsay( playerid, params[ ] )
|
|||||||
return SendError( playerid, "You cannot speak as you are muted for %s.", secondstotime( p_MutedTime[ playerid ] - time ) );
|
return SendError( playerid, "You cannot speak as you are muted for %s.", secondstotime( p_MutedTime[ playerid ] - time ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "__**(VIP) %s(%d):**__ %s", ReturnPlayerName( playerid ), playerid, msg );
|
DCC_SendChannelMessageFormatted( discordChatChan, "**[%s] (VIP) %s(%d):** %s", getCurrentTime(), ReturnPlayerName( playerid ), playerid, msg );
|
||||||
SendClientMessageToAllFormatted( 0x3eff3eff, "[VIP] %s(%d):{9ec34f} %s", ReturnPlayerName( playerid ), playerid, msg );
|
SendClientMessageToAllFormatted( 0x3eff3eff, "[VIP] %s(%d):{9ec34f} %s", ReturnPlayerName( playerid ), playerid, msg );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -2486,6 +2486,7 @@ CMD:ask( playerid, params[ ] )
|
|||||||
Beep( playerid );
|
Beep( playerid );
|
||||||
SendClientMessageToAdmins( -1, "{FE5700}[QUESTION] %s(%d):{FFFFFF} %s", ReturnPlayerName( playerid ), playerid, szMessage );
|
SendClientMessageToAdmins( -1, "{FE5700}[QUESTION] %s(%d):{FFFFFF} %s", ReturnPlayerName( playerid ), playerid, szMessage );
|
||||||
SendClientMessageFormatted( playerid, -1, "{FE5700}[QUESTION]"COL_WHITE" You've asked \"%s\".", szMessage );
|
SendClientMessageFormatted( playerid, -1, "{FE5700}[QUESTION]"COL_WHITE" You've asked \"%s\".", szMessage );
|
||||||
|
DCC_SendChannelMessageFormatted( discordAskChan, "**[QUESTION]** __**%s(%d)**__: %s", ReturnPlayerName( playerid ), playerid, szMessage );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -2601,10 +2602,6 @@ thread OnPlayerLastLogged( playerid, irc, player[ ] )
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( !irc ) SendClientMessageFormatted( playerid, COLOR_GREY, "[SERVER]"COL_RED" %s:"COL_WHITE" Last Logged: %s", player, Field );
|
if ( !irc ) SendClientMessageFormatted( playerid, COLOR_GREY, "[SERVER]"COL_RED" %s:"COL_WHITE" Last Logged: %s", player, Field );
|
||||||
else {
|
|
||||||
format( szNormalString, sizeof( szNormalString ),"7LAST LOGGED OF '%s': %s", player, Field );
|
|
||||||
DCC_SendChannelMessage( discordGeneralChan, szNormalString );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if ( !irc ) SendError( playerid, "Player not found." );
|
if ( !irc ) SendError( playerid, "Player not found." );
|
||||||
@ -2640,11 +2637,6 @@ thread OnPlayerWeeklyTime( playerid, irc, player[ ] )
|
|||||||
iLastUptime = cache_get_field_content_int( 0, "WEEKEND_UPTIME", dbHandle );
|
iLastUptime = cache_get_field_content_int( 0, "WEEKEND_UPTIME", dbHandle );
|
||||||
|
|
||||||
if ( !irc ) SendClientMessageFormatted( playerid, COLOR_GREY, "[SERVER]"COL_GREY" %s:"COL_WHITE" %s", player, secondstotime( iCurrentUptime - iLastUptime ) );
|
if ( !irc ) SendClientMessageFormatted( playerid, COLOR_GREY, "[SERVER]"COL_GREY" %s:"COL_WHITE" %s", player, secondstotime( iCurrentUptime - iLastUptime ) );
|
||||||
else
|
|
||||||
{
|
|
||||||
format( szNormalString, sizeof( szNormalString ),"7WEEKLY TIME OF '%s': %s", player, secondstotime( iCurrentUptime - iLastUptime ) );
|
|
||||||
DCC_SendChannelMessage( discordGeneralChan, szNormalString );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3342,7 +3334,7 @@ CMD:me( playerid, params[ ] )
|
|||||||
else if ( sscanf( params, "s[70]", action ) ) return SendUsage( playerid, "/me [ACTION]" );
|
else if ( sscanf( params, "s[70]", action ) ) return SendUsage( playerid, "/me [ACTION]" );
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DCC_SendChannelMessageFormatted( discordGeneralChan, "** * * * %s(%d) %s **", ReturnPlayerName( playerid ), playerid, action );
|
//DCC_SendChannelMessageFormatted( discordGeneralChan, "** * * * %s(%d) %s **", ReturnPlayerName( playerid ), playerid, action );
|
||||||
SendClientMessageToAllFormatted( GetPlayerColor( playerid ), "*** %s(%d) %s", ReturnPlayerName( playerid ), playerid, action );
|
SendClientMessageToAllFormatted( GetPlayerColor( playerid ), "*** %s(%d) %s", ReturnPlayerName( playerid ), playerid, action );
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
@ -5794,7 +5786,7 @@ stock SendGlobalMessage( colour, const format[ ], va_args<> )
|
|||||||
strreplace( out, #COL_PINK, "**" );
|
strreplace( out, #COL_PINK, "**" );
|
||||||
strreplace( out, #COL_GREY, "**" );
|
strreplace( out, #COL_GREY, "**" );
|
||||||
strreplace( out, #COL_WHITE, "**" );
|
strreplace( out, #COL_WHITE, "**" );
|
||||||
DCC_SendChannelMessage( discordGeneralChan, out );
|
//DCC_SendChannelMessage( discordGeneralChan, out );
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -6210,7 +6202,7 @@ stock AddAdminLogLine( szMessage[ sizeof( log__Text[ ] ) ] )
|
|||||||
memcpy( log__Text[ iPos ], log__Text[ iPos + 1 ], 0, sizeof( log__Text[ ] ) * 4 );
|
memcpy( log__Text[ iPos ], log__Text[ iPos + 1 ], 0, sizeof( log__Text[ ] ) * 4 );
|
||||||
|
|
||||||
strcpy( log__Text[ 4 ], szMessage );
|
strcpy( log__Text[ 4 ], szMessage );
|
||||||
DCC_SendChannelMessage( discordAdminChan, szMessage );
|
DCC_SendChannelMessageFormatted( discordLogChan, "**[SERVER LOG]** %s" ,szMessage );
|
||||||
|
|
||||||
format( szLargeString, 500, "%s~n~%s~n~%s~n~%s~n~%s", log__Text[ 0 ], log__Text[ 1 ], log__Text[ 2 ], log__Text[ 3 ], log__Text[ 4 ] );
|
format( szLargeString, 500, "%s~n~%s~n~%s~n~%s~n~%s", log__Text[ 0 ], log__Text[ 1 ], log__Text[ 2 ], log__Text[ 3 ], log__Text[ 4 ] );
|
||||||
return TextDrawSetString( g_AdminLogTD, szLargeString );
|
return TextDrawSetString( g_AdminLogTD, szLargeString );
|
||||||
|
Loading…
Reference in New Issue
Block a user