resetscore

Šiame forume rašomi vartotojų klausimai/problemos su kuriomis jie susidūrė kuriant pluginus.
Post Reply
User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

resetscore

Post by laimiukas3 »

bandau pasidaryti kad txt is data lang skaitytu bet nesigauna gaunu tokia klaida :D gal kas gali pasakyti kur ka ne taip padariau
Invalid multi-lingual line (file "cstrike\addons\amxmod
x\data\lang\resetscore.txt" line 5)
Invalid multi-lingual line (file "cstrike\addons\amxmod
x\data\lang\resetscore.txt" line 11)

Code: Select all

#include <amxmodx>#include <amxmisc>#include <cstrike>#include <fun> #define adtime   600.0 //Default of 10 minuites new pcvar_Advertisenew pcvar_Display public plugin_init(){    register_plugin("Reset Score", "1.0", "Silenttt")        //You may type /resetscore or /restartscore    register_clcmd("say /resetscore", "reset_score")    register_clcmd("say /restartscore", "reset_score")    register_clcmd("say /rs", "reset_score")    register_dictionary("resetscore.txt")        //This command by default will be set at 0    //Change it to 1 in server.cfg if you want    //A message to be shown to advertise this.    pcvar_Advertise = register_cvar("sv_rsadvertise", "1")    //This command by default is also 0    //Change it to 1 in server.cfg if you want    //It to show who reset their scores when they do it    pcvar_Display = register_cvar("sv_rsdisplay", "1")        if(get_cvar_num("sv_rsadvertise") == 1)    {        set_task(adtime, "advertise", _, _, _, "b")    }} public reset_score(id){    //These both NEED to be done twice, otherwise your frags wont    //until the next round    cs_set_user_deaths(id, 0)    set_user_frags(id, 0)    cs_set_user_deaths(id, 0)    set_user_frags(id, 0)        if(get_pcvar_num(pcvar_Display) == 1)    {        new name[33]        get_user_name(id, name, 32)        client_print(0, print_chat, "%s %RS", name, LANG_PLAYER, "PUBLIC_RESET")     }    else    {        client_print(id, print_chat, "%RS", LANG_PLAYER, "PRIVATE_RESET")     }    return PLUGIN_HANDLED} public advertise(){    set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)    show_hudmessage(0, "By typing /rs you can restart your deaths and kills back to 0")} public client_putinserver(id){    if(get_pcvar_num(pcvar_Advertise) == 1)    {        set_task(10.0, "connectmessage", id, _, _, "a", 1)    }} public connectmessage(id){    if(is_user_connected(id))    {    client_print(id, print_chat, "%RS", LANG_PLAYER, "PUBLIC_MESSAGE")     }} 
data/lang/resetscore.txt

Code: Select all

[en]PUBLIC_RESET = has just reset his scorePRIVATE_RESET = You reset your scorePUBLIC_MESSAGE = By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting) [ru]PUBLIC_RESET = Обнулил очкиPRIVATE_RESET = Вы обнулили свои очкиPUBLIC_MESSAGE = Команда /resetscore обнуляет ваш счёт фрагов и смертей без использования команды "reconnect" или "retry" 
Image
Image
Image

DYaGesS
Flooderis arba specialistas
Posts: 875
Joined: 2013 Jan 16 01:01
Skype: usercs.com
Contact:

Re: resetscore

Post by DYaGesS »

nemėginai nedėt naujos eilutės?

Code: Select all

 [en]PUBLIC_RESET = has just reset his scorePRIVATE_RESET = You reset your scorePUBLIC_MESSAGE = By typing /resetscore at any time during the game, you can reset your deaths and kills back to 0 (rather than reconnecting) [ru]PUBLIC_RESET = Обнулил очкиPRIVATE_RESET = Вы обнулили свои очкиPUBLIC_MESSAGE = Команда /resetscore обнуляет ваш счёт фрагов и смертей без использования команды "reconnect" или "retry" 
Padėjau? +rep

User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Re: resetscore

Post by laimiukas3 »

padejo :D
bet vistiek /rs parasius raso Player RS
o turetu Player You reset your score
kazka turbut cia busiu ne taip padares

Code: Select all

client_print(id, print_chat, "%RS", LANG_PLAYER, "PRIVATE_RESET")client_print(0, print_chat, "%s %RS", name, LANG_PLAYER, "PUBLIC_RESET")client_print(id, print_chat, "%RS", LANG_PLAYER, "PUBLIC_MESSAGE")
Image
Image
Image

User avatar
hleV
AMX Mod X ekspertai
Posts: 875
Joined: 2011 Apr 02 11:23
Skype: hlev.lt
Location: Šiauliai

Re: resetscore

Post by hleV »

%RS%L.
LANG_PLAYERid (išskyrus kai indeksas 0).
Image ← RIP best userbar
DISKUSIJA: KIETAS PLUGIN'O UŽSAKOVAS
Privačios pagalbos neteikiu!

User avatar
laimiukas3
Moderatorius
Posts: 4569
Joined: 2012 Aug 03 01:12
Skype: laimiukas3
Location: Vilnius
Contact:

Re: resetscore

Post by laimiukas3 »

viskas veikia ačiū abiems :liux:
Image
Image
Image

Post Reply

Who is online

Users browsing this forum: Amazon [Bot] and 4 guests