RSSy MYGO.pl Opublikowano Styczeń 2, 2024 o 15:07 RSSy Udostępnij Opublikowano Styczeń 2, 2024 o 15:07 CS/ CZ: Conditioned Grenade Radio v1.0GameTracker/ servers using CGR v1.0 PHP Code: cgr_enabled 1 /// Sets whether or not this plugin is enabled. cgr_spaces 0 /// A value of 0 means the default '(RADIO): Fire' and a value of 1 means '(RADIO) : Fire'. cgr_dead 1 /// Sets whether or not the grenade radio phrases will be displayed to the dead players as well. cgr_reliable 0 /// Sets whether or not the replacement grenade radio phrases will be delivered as reliable. cgr_random 1 /// Sets whether or not to use random grenade radio phrases when the players are throwing grenades. cgr_custom 0 /// Sets whether or not only the grenade name in the entire grenade radio phrase should be colored. cgr_alive 32 /// Only display grenade radio phrases to the team if at most this number of players are alive in it. cgr_append 0 /// Sets whether or not to only append a colored GRENADE, FLASH or SMOKE string after the original game grenade radio phrase. cgr_name 1 /// Sets the color of the player name in grenade radio phrases. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_radio 1 /// Sets the color of the RADIO string in grenade radio phrases. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_dots 1 /// Sets the color of the dots symbol (':' symbol) in grenade radio phrases. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_parentheses 1 /// Sets the color of the parentheses in grenade radio phrases. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_at 1 /// Sets the color of the at symbol ('@' symbol) in grenade radio phrases which contain map locations. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_location 4 /// Sets the color of the actual map location in grenade radio phrases which contain map locations. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_dots_enabled 1 /// Sets whether or not to enable the default dots in grenade radio phrases (':' symbol). cgr_name_location 4 /// Sets the color of the player name in grenade radio phrases which contain map locations. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_radio_location 1 /// Sets the color of the RADIO string in grenade radio phrases which contain map locations. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_parentheses_location 1 /// Sets the color of the parentheses in grenade radio phrases which contain map locations. 1 for normal color, 3 for grenade color (thrower's team color if smoke) and 4 for green. cgr_dead_audio 1 /// Sets whether or not the grenade radio voices will be played to the dead players as well. cgr_alive_audio 32 /// Only play grenade radio voices to the team if at most this number of players are alive in it. Code: ------------ cgr_append 0 ------------ ------------ cgr_random 1 cgr_custom 1 ------------ ------ CS/ CZ ------ Caramel (RADIO): Throwing grenade! Caramel (RADIO): Flashbang out! Caramel (RADIO): Deploying smoke! ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): Throwing grenade! Caramel @ CTSpawn (RADIO): Flashbang out! Caramel @ CTSpawn (RADIO): Deploying smoke! ------------ cgr_random 1 cgr_custom 0 ------------ ------ CS/ CZ ------ Caramel (RADIO): Throwing grenade! Caramel (RADIO): Flashbang out! Caramel (RADIO): Deploying smoke! ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): Throwing grenade! Caramel @ CTSpawn (RADIO): Flashbang out! Caramel @ CTSpawn (RADIO): Deploying smoke! ------------ cgr_random 0 cgr_custom 1 ------------ ------ CS/ CZ ------ Caramel (RADIO): Fire in the hole! Caramel (RADIO): Fire in the hole! Caramel (RADIO): Fire in the hole! ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): Fire in the hole! Caramel @ CTSpawn (RADIO): Fire in the hole! Caramel @ CTSpawn (RADIO): Fire in the hole! ------------ cgr_random 0 cgr_custom 0 ------------ ------ CS/ CZ ------ Caramel (RADIO): Fire in the hole! Caramel (RADIO): Fire in the hole! Caramel (RADIO): Fire in the hole! ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): Fire in the hole! Caramel @ CTSpawn (RADIO): Fire in the hole! Caramel @ CTSpawn (RADIO): Fire in the hole! ------------ cgr_append 1 ------------ ------ CS/ CZ ------ Caramel (RADIO): Fire in the hole! GRENADE Caramel (RADIO): Fire in the hole! FLASH Caramel (RADIO): Fire in the hole! SMOKE ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): Fire in the hole! GRENADE Caramel @ CTSpawn (RADIO): Fire in the hole! FLASH Caramel @ CTSpawn (RADIO): Fire in the hole! SMOKE ------------ cgr_append 2 ------------ ------ CS/ CZ ------ Caramel (RADIO): GRENADE Caramel (RADIO): FLASH Caramel (RADIO): SMOKE ------------------ CZ w/ Map Location ------------------ Caramel @ CTSpawn (RADIO): GRENADE Caramel @ CTSpawn (RADIO): FLASH Caramel @ CTSpawn (RADIO): SMOKE See The 'conditioned_grenade_radio.inc' File PHP Code: #if defined _conditioned_grenade_radio #endinput #endif /// defined _conditioned_grenade_radio #define _conditioned_grenade_radio #if defined AMXX_VERSION_NUM #if AMXX_VERSION_NUM >= 175 #pragma reqlib conditioned_grenade_radio #if !defined AMXMODX_NOAUTOLOAD #pragma loadlib conditioned_grenade_radio #endif /// !defined AMXMODX_NOAUTOLOAD #else /// AMXX_VERSION_NUM >= 175 #pragma library conditioned_grenade_radio #endif /// AMXX_VERSION_NUM >= 175 #else /// defined AMXX_VERSION_NUM #pragma library conditioned_grenade_radio #endif /// defined AMXX_VERSION_NUM #include < amxmodx > /** * * Sets the tag. This will overwrite an existing tag, if any. * * Do not call this inside the `client_connect()` forward. Call this later. For example, call this inside the `client_authorized()` or `client_putinserver()` forwards. * * The examples of tags are listed below. * * "\x04[CARAMEL] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GREEN ] * * "^x04[CARAMEL] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GREEN ] * * "\x03[CARAMEL] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * * "^x03[CARAMEL] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * * "[\x04 CARAMEL\x01 ] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GREEN ] * "[ \x04CARAMEL \x01] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GREEN ] * * "[^x04 CARAMEL^x01 ] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GREEN ] * "[ ^x04CARAMEL ^x01] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GREEN ] * * "[\x03 CARAMEL^x01 ] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * "[ \x03CARAMEL ^x01] " ( If In Your .SMA There Is `#pragma ctrlchar '\'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * * "[^x03 CARAMEL^x01 ] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * "[ ^x03CARAMEL ^x01] " ( If In Your .SMA There Is No `#pragma ctrlchar` At All Or There Is `#pragma ctrlchar '^'` ) [ GRENADE = RED, FLASH = GREY & SMOKE = TEAM COLOR ( RED/ BLUE ) { THROWER'S TEAM COLOR } ] * * "CARAMEL " [ NORMAL COLOR ] * * "[CARAMEL] " [ NORMAL COLOR ] * */ native CGR_SetPlayerTag(nPlayer, const szTag[]); /** * * Removes the tag. * * No need to call this inside `client_connect()`, `client_disconnect()` or `client_disconnected()`. * */ native CGR_DelPlayerTag(nPlayer); Example Of Setting A Player Tag/ See The 'cgr_player_tags.sma' File PHP Code: #pragma tabsize 0 #pragma semicolon 0 #pragma ctrlchar '\' #pragma dynamic 4194304 #include < amxmodx > #include < conditioned_grenade_radio > static const g_pszSteams[] = { "STEAM_0:0:36120359", }; static const g_pszTags[] = { "[\x04 KING\x01 ] ", }; #if !defined MaxClients static g_nPlayers = 0; #endif public plugin_init() { register_plugin("CGR Player Tags", __DATE__, "Hattrick HKS (ClaudiuHKS)"); return PLUGIN_CONTINUE; } public plugin_cfg() { #if !defined MaxClients g_nPlayers = get_maxplayers(); if (1 > g_nPlayers) { return PLUGIN_CONTINUE; } #endif /// return PLUGIN_CONTINUE; } #if defined client_connectex public client_authorized(nPlayer, const szSteam[]) #else public client_authorized(nPlayer) #endif { static nIter = 0; #if !defined client_connectex static szSteam[64] = { EOS, ... }; #endif if (1 > nPlayer) { return PLUGIN_CONTINUE; } #if !defined MaxClients if (nPlayer > g_nPlayers) { return PLUGIN_CONTINUE; } #else if (nPlayer > MaxClients) { return PLUGIN_CONTINUE; } #endif #if !defined client_connectex get_user_authid(nPlayer, szSteam, charsmax(szSteam)); #endif for (nIter = 0; nIter < sizeof(g_pszSteams); nIter++) { if (!equali(g_pszSteams[nIter], szSteam)) { continue; } CGR_SetPlayerTag(nPlayer, g_pszTags[nIter]); break; } return PLUGIN_CONTINUE; } public client_putinserver(nPlayer) { static nIter = 0; static szSteam[64] = { EOS, ... }; if (1 > nPlayer) { return PLUGIN_CONTINUE; } #if !defined MaxClients if (nPlayer > g_nPlayers) { return PLUGIN_CONTINUE; } #else if (nPlayer > MaxClients) { return PLUGIN_CONTINUE; } #endif get_user_authid(nPlayer, szSteam, charsmax(szSteam)); for (nIter = 0; nIter < sizeof(g_pszSteams); nIter++) { if (!equali(g_pszSteams[nIter], szSteam)) { continue; } CGR_SetPlayerTag(nPlayer, g_pszTags[nIter]); break; } return PLUGIN_CONTINUE; } conditioned_grenade_radio.inc goes to /addons/amxmodx/scripting/include/ Attached Files Get Plugin or Get Source (cs_conditioned_grenade_radio.sma - 164.2 KB) conditioned_grenade_radio.inc (3.5 KB) Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi