Raised This Month: $32 Target: $400
 8% 

Country Nick Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
taran
New Member
Join Date: Mar 2017
Old 03-29-2017 , 05:02   Re: Country Nick Plugin
Reply With Quote #131

I was thinking more on the line in the original plugin

if(GeoipCountry(ip, country, 45))
{
PrintToChatAll("\x03%T", "Has Connected from ", LANG_SERVER, client, country);
}
taran is offline
Dreizehnt
Junior Member
Join Date: Jan 2016
Location: Russian Federation
Old 06-26-2017 , 16:47   Re: Country Nick Plugin
Reply With Quote #132

Translation into russian:
Code:
"Phrases"
{    
    "Announcer country found"
    {
        "#format"   "{1:N},{2:s}"
        "ru"        "{1} из {2} присоединился к игре"
    }
    
    "Announcer country not found"
    {
        "#format"   "{1:N}"
        "ru"        "{1} с далёкой планеты присоединился к игре"
    }
}
Attached Files
File Type: zip ru.zip (482 Bytes, 180 views)
__________________
Dreizehnt is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 01-30-2018 , 15:28   Re: Country Nick Plugin
Reply With Quote #133

This plugin would be perfect if you could add the admin ID, as in the example below:

// Layout of how and what the admin tag should look like, (Note: {NAME} equates to the genorated string from PACT_Name_Layout
// -
// Default: "(A) {NAME}"
**** PACT_Admin_Layout "[ADMIN] {NAME}"

This configuration appears in a pluguim that was abandoned, I use it, but it does not work well above 8 players, sometimes it does not recognize the Country.

https://forums.alliedmods.net/showthread.php?t=121919
Mi.Cura is offline
Mi.Cura
Veteran Member
Join Date: Dec 2016
Location: Brazil
Old 04-06-2018 , 13:30   Re: Country Nick Plugin
Reply With Quote #134

I have been looking for this for a long time, and I can not find a plugin that puts a TAG in front of the ADMINS names, using using the admins_simple.ini file.

// Default: "(A) {NAME}"
**** PACT_Admin_Layout "[ADMIN] {NAME}"

This plugin applies the country, but does not put a TAG in front of the name, would be great if it had.
Mi.Cura is offline
Kelvin
Junior Member
Join Date: Jan 2016
Location: Brazil
Old 07-22-2018 , 10:45   Re: Country Nick Plugin
Reply With Quote #135

pt-br translation https://drive.google.com/file/d/1qJW...ew?usp=sharing
__________________
Nemesis Freak Fortress Server>
Steam Group:https://steamcommunity.com/groups/nemesisTF2BR
SourceBans: http://nemesis.mibbs.host/
Kelvin is offline
Send a message via Skype™ to Kelvin
S17V357R3
New Member
Join Date: Mar 2017
Old 12-19-2018 , 01:05   Re: Country Nick Plugin
Reply With Quote #136

Hello... i need help about this plugin..

How i can disable my TAG? i wanna looks like [---] or even change my own tag ...is a IP3code [xxx]...
thanks, sorry for disturbing.. i send a MP to AeNo, but he's not online anymore
S17V357R3 is offline
eyal282
Veteran Member
Join Date: Aug 2011
Old 12-19-2018 , 11:04   Re: Country Nick Plugin
Reply With Quote #137

Why would someone in their right mind use LANG_SERVER when every client can pick their own language?
__________________
I am available to make plugins for pay.

Discord: Eyal282#1334
eyal282 is offline
KALASH NICOLE
Member
Join Date: Feb 2016
Old 05-24-2019 , 17:23   Re: Country Nick Plugin
Reply With Quote #138

[NECRO/CRASH]

the code posted by JyrmaSika (reply #126) may trigger steam authentification failure :

STEAMAUTH: Client [clientname] received failure code 6
Dropped [clientname] from server (Client left game (Steam auth ticket has been canceled)


I had my server crashing everyday since months, crashs could occurs some hours after i restarted my serv.

last week I decided to remove most of my plugins (I put them in disabled folder). server was fine during a full week (which never happened with the plugins). i readded ONLY this countrycode.smx tonight....and baaam, at map rotation, server crash. In the server console log all players getting the crash message mentionned above, followed by '[clientname] disconnected (reason "Server shutting down")' for each players.


here is the incrimined code, there is surely something in relation to steam, where some authentification or authorization (SteamAuth) is skipped, and trigger the server/client crash

PHP Code:
/*
  Player Country Codes
  Author: Jyrma Sika
  Forked from malfunctioning Country Nick Plugin by Antoine LIBERT aka AeN0


  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma semicolon 1

#include <sourcemod>
#include <sdktools>
#include <geoip>

#define VERSION "0.2"

public Plugin:myinfo =
{
  
name "Player Country Codes",
  
author "Jyrma Sika. Original version Antoine LIBERT aka AeN0",
  
description "Player Country Codes Forked from Country Nick Plugin",
  
version VERSION,
  
url "https://www.facepalm.fi"
};

public 
OnPluginStart()
{
  
LoadTranslations("countrynick.phrases");
}


public 
OnClientConnected(client)
{
  if (
IsFakeClient(client)) {
    return;
  }

  
SetPlayerCountryCode(client);
}

// Just to make sure the country code prefix is added
public OnClientAuthorized(client, const String:auth[])
{
  if (
IsFakeClient(client)) {
    return;
  }

  
SetPlayerCountryCode(client);
}

public 
SetPlayerCountryCode(client)
{
  if(!
IsFakeClient(client))
    {      
      
decl String:newname[69];
      
decl String:nick[69];
      
decl String:flag[5];
      
      
GetClientInfo(client"name"newname69);
      
      
getFlagOfPlayer(clientflag5);
      if(
strncmp(flagnewname4false) == 0) {
      }
      else {
    
Format(nick69"%2s%s"flagnewname);
    
SetClientName(clientnick);
      }
    }  
}

getFlagOfPlayer(clientString:flag[], size)
{
  
decl String:ip[16];
  
decl String:code2[3];
  
  
GetClientIP(clientip16);
  if(
GeoipCode2(ipcode2))
    {
      
Format(flagsize"[%2s]"code2);
      return 
true;
    }
  else
    {
      
Format(flagsize"[--]");
      return 
false;
    }


Last edited by KALASH NICOLE; 05-24-2019 at 17:28.
KALASH NICOLE is offline
zaviier
Senior Member
Join Date: Aug 2017
Location: Indonesia
Old 07-11-2019 , 02:47   Re: Country Nick Plugin
Reply With Quote #139

is there any method for enable notification only, and disable name change?
zaviier is offline
BloodyBlade
Senior Member
Join Date: Feb 2018
Old 09-16-2019 , 16:55   Re: Country Nick Plugin
Reply With Quote #140

* Converted plugin source to the latest syntax. Requires SourceMod 1.8 or newer.
Attached Files
File Type: sp Get Plugin or Get Source (countrynick 1.2.sp - 373 views - 3.8 KB)
BloodyBlade is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:34.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode