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

SourceMod Translations conflict with ban.sp (Which is correct??)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 03-04-2023 , 13:22   SourceMod Translations conflict with ban.sp (Which is correct??)
Reply With Quote #1

I'm trying to understand translations, but the SourceMod documentations conflict with the SourceMod plugin ban.sp

https://github.com/alliedmodders/sou...ans/ban.sp#L42

PrintToServer("[SM] %t", "Player no longer available");


and

https://wiki.alliedmods.net/Translat...eMod_Scripting)

However, in functions which are not "player directed," such as Format or PrintToServer, only '%T' can be used.

What is correct??

I'm trying to get the translations correctly working for War3Source-EVO
__________________
El Diablo War3Evo is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 03-04-2023 , 19:23   Re: SourceMod Translations conflict with ban.sp (Which is correct??)
Reply With Quote #2

PHP Code:

public void OnPluginStart()
{
    
LoadTranslations("common.phrases");
    
RegConsoleCmd("sm_test"test);
}

public 
Action test(int clientint args)
{
    
PrintToServer("[SM] %t""Player no longer available");
    
    return 
Plugin_Handled;

Code:
sm_test
[SM] The player you selected is no longer available.
works fine.


Maybe it have changed in these past years. Or it was so called "example" code which not have target.
Bacardi is offline
El Diablo War3Evo
Veteran Member
Join Date: Jun 2013
Old 03-05-2023 , 11:34   Re: SourceMod Translations conflict with ban.sp (Which is correct??)
Reply With Quote #3

Quote:
Originally Posted by Bacardi View Post
PHP Code:

public void OnPluginStart()
{
    
LoadTranslations("common.phrases");
    
RegConsoleCmd("sm_test"test);
}

public 
Action test(int clientint args)
{
    
PrintToServer("[SM] %t""Player no longer available");
    
    return 
Plugin_Handled;

Code:
sm_test
[SM] The player you selected is no longer available.
works fine.


Maybe it have changed in these past years. Or it was so called "example" code which not have target.
Thank you!
__________________
El Diablo War3Evo is offline
Reply


Thread Tools
Display Modes

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 09:13.


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