View Single Post
Author Message
Lord Nightmare
Junior Member
Join Date: Feb 2014
Location: Poland
Old 02-22-2020 , 12:19   KickClient Message translation
Reply With Quote #1

Hi folks
I can't figure out how to force a translated message on player kick.
Translation file has been created and still showing me a English phrase.
Can someone help me with that or maybe show me whats wrong with my code?

PHP Code:

#pragma semicolon 1

#define DEBUG

#define PLUGIN_AUTHOR "Lord N"
#define PLUGIN_VERSION "1.00"

#include <sourcemod>
#include <sdktools>
#include <cstrike>

#pragma newdecls required

int LimitPlayers 1;

public 
Plugin myinfo 
{
    
name "Test Kick Message",
    
author PLUGIN_AUTHOR,
    
description "",
    
version PLUGIN_VERSION,
    
url ""
};

public 
void OnPluginStart()
{
    
LoadTranslations("slot.phrases");
}
public 
Action OnClientPreAdminCheck(int client)
{
    
int MaxSlots GetMaxHumanPlayers();
    
int CurrentPlayers GetClientCount(false);
    
    
    if(
CurrentPlayers == MaxSlots){
        
        
KickClientEx(client"MAX PLAYERS!");
    }
    else if(
CurrentPlayers >= LimitPlayers){
        
        
MessageDeliver(client);
    }
}
public 
Action MessageDeliver(int client){
    
    
char Message[64];
    
FormatEx(Messagesizeof(Message), "%t""WarningTest");
    
KickClientEx(clientMessage);


Last edited by Lord Nightmare; 02-25-2020 at 12:57.
Lord Nightmare is offline