Raised This Month: $342 Target: $400
 85%   Almost there!

Solved NativeVotes: translating the vote title

Post New Thread Reply   
Thread Tools Display Modes
Author Message
Senior Member
Join Date: May 2015
Old 09-01-2020 , 15:45   NativeVotes: translating the vote title
Reply With Quote #1

Does anyone have any suggestions or example code on how to translate a vote display title (using Native Votes)?

PHP Code:
char sDetails[256];
FormatEx(sDetailssizeof(sDetails), "Change server tickrate to %i?"g_iTickVote);
Trying this:
PHP Code:
char sDetails[256];
for (
int i1<= MaxClientsi++)
    if (!
IsClientInGame(i) || IsFakeClient(i)) continue;
// NativeVotes_Display() requires an array index for 2nd argument
int iClient[1];
iClient[0] = i;
FormatEx(sDetailssizeof(sDetails), "%T""TICKRATE_VOTE"ig_iTickVote);
But it keeps the vote on the screen indefinitely and produces the following error:
L 09/01/2020 - 15:36:44: [SM] Exception reported: Invalid key value handle 3e00286 (error 3)
L 09/01/2020 - 15:36:44: [SM] Blaming: nativevotes.smx
L 09/01/2020 - 15:36:44: [SM] Call stack trace:
L 09/01/2020 - 15:36:44: [SM]   [0] KvGetNum
L 09/01/2020 - 15:36:44: [SM]   [1] Line 176, D:\tf2server\plugins\nativevotes\addons\sourcemod\scripting\nativevotes/data-keyvalues.sp::Data_GetResultCallback
L 09/01/2020 - 15:36:44: [SM]   [2] Line 1532, D:\tf2server\plugins\nativevotes\addons\sourcemod\scripting\nativevotes.sp::Native_SetResultCallback
L 09/01/2020 - 15:36:44: [SM]   [4] NativeVotes_SetResultCallback
L 09/01/2020 - 15:36:44: [SM]   [5] Line 396, D:\Documents\game folders\left 4 dead 2\sourcemod 1.8.0\addons\sourcemod\scripting\resetonempty.sp::Vote_Tickrate

I'm in the process of translating plugin messages so that we can set up servers in different regions. This has me completely stumped.

I'm looking for the phrase "Change server tickrate to %i?" to be translated individually to each client depending on what their language is set to.

Nvm found something. Must've been real tired last night to have missed this when searching through stuff


Last edited by dustinandband; 09-01-2020 at 16:05. Reason: solved
dustinandband is offline

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 01:32.

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