hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.04.28. 05:49



Jelenlévő felhasználók

Jelenleg 536 felhasználó van jelen :: 0 regisztrált, 0 rejtett és 536 vendég

A legtöbb felhasználó (1565 fő) 2020.11.21. 11:26-kor tartózkodott itt.

Regisztrált felhasználók: nincs regisztrált felhasználó az elmúlt 5 percben aktív felhasználók alapján

Utoljára aktív
Ahhoz hogy lásd ki volt utoljára aktív, be kell jelentkezned.



Az oldal teljeskörű
használatához regisztrálj.

Regisztráció

Kereső


Új téma nyitása  Hozzászólás a témához  [ 19 hozzászólás ]  Oldal 1 2 Következő
Szerző Üzenet
 Hozzászólás témája: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 17:32 
Offline
Őstag
Avatar

Csatlakozott: 2010.04.16. 16:50
Hozzászólások: 1342
Megköszönt másnak: 42 alkalommal
Megköszönték neki: 58 alkalommal
Valaki eltudná nekem magyarázni hogy tudok langba szinesen írni? Pl colorchat-tal meglehet oldalni?
Pl ezt szeretném hogy szines legyen
adminvote.txt
VOTING_RES_3 =
%s (van "%d") (kell "%d"). Az eredmeny: %s

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 17:38 
Offline
Veterán
Avatar

Csatlakozott: 2011.06.07. 15:29
Hozzászólások: 1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
Ahhoz az SMA-t kell átírni.
Kód:
  1. /* AMX Mod X

  2. *   Admin Votes Plugin

  3. *

  4. * by the AMX Mod X Development Team

  5. *  originally developed by OLO

  6. *

  7. * This file is part of AMX Mod X.

  8. *

  9. *

  10. *  This program is free software; you can redistribute it and/or modify it

  11. *  under the terms of the GNU General Public License as published by the

  12. *  Free Software Foundation; either version 2 of the License, or (at

  13. *  your option) any later version.

  14. *

  15. *  This program is distributed in the hope that it will be useful, but

  16. *  WITHOUT ANY WARRANTY; without even the implied warranty of

  17. *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

  18. *  General Public License for more details.

  19. *

  20. *  You should have received a copy of the GNU General Public License

  21. *  along with this program; if not, write to the Free Software Foundation,

  22. *  Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

  23. *

  24. *  In addition, as a special exception, the author gives permission to

  25. *  link the code of this program with the Half-Life Game Engine ("HL

  26. *  Engine") and Modified Game Libraries ("MODs") developed by Valve,

  27. *  L.L.C ("Valve"). You must obey the GNU General Public License in all

  28. *  respects for all of the code used other than the HL Engine and MODs

  29. *  from Valve. If you modify this file, you may extend this exception

  30. *  to your version of the file, but you are not obligated to do so. If

  31. *  you do not wish to do so, delete this exception statement from your

  32. *  version.

  33. */

  34.  

  35. #include <amxmodx>

  36. #include <amxmisc>

  37. #include <colorchat>

  38.  

  39.  

  40. new g_Answer[128]

  41. new g_optionName[4][64]

  42. new g_voteCount[4]

  43. new g_validMaps

  44. new g_yesNoVote

  45. new g_coloredMenus

  46. new g_voteCaller

  47. new g_Execute[256]

  48. new g_execLen

  49.  

  50. new bool:g_execResult

  51. new Float:g_voteRatio

  52.  

  53. public plugin_init()

  54. {

  55.         register_plugin("Admin Votes", AMXX_VERSION_STR, "AMXX Dev Team")

  56.         register_dictionary("adminvote.txt")

  57.         register_dictionary("common.txt")

  58.         register_dictionary("mapsmenu.txt")

  59.         register_menucmd(register_menuid("Change map to "), MENU_KEY_1|MENU_KEY_2, "voteCount")

  60.         register_menucmd(register_menuid("Choose map: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount")

  61.         register_menucmd(register_menuid("Kick "), MENU_KEY_1|MENU_KEY_2, "voteCount")

  62.         register_menucmd(register_menuid("Ban "), MENU_KEY_1|MENU_KEY_2, "voteCount")

  63.         register_menucmd(register_menuid("Vote: "), MENU_KEY_1|MENU_KEY_2|MENU_KEY_3|MENU_KEY_4, "voteCount")

  64.         register_menucmd(register_menuid("The result: "), MENU_KEY_1|MENU_KEY_2, "actionResult")

  65.         register_concmd("amx_votemap", "cmdVoteMap", ADMIN_VOTE, "<map> [map] [map] [map]")

  66.         register_concmd("amx_votekick", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")

  67.         register_concmd("amx_voteban", "cmdVoteKickBan", ADMIN_VOTE, "<name or #userid>")

  68.         register_concmd("amx_vote", "cmdVote", ADMIN_VOTE, "<question> <answer#1> <answer#2>")

  69.         register_concmd("amx_cancelvote", "cmdCancelVote", ADMIN_VOTE, "- cancels last vote")

  70.        

  71.         g_coloredMenus = colored_menus()

  72. }

  73.  

  74. public cmdCancelVote(id, level, cid)

  75. {

  76.         if (!cmd_access(id, level, cid, 0))

  77.                 return PLUGIN_HANDLED

  78.  

  79.         if (task_exists(99889988, 1))

  80.         {

  81.                 new authid[32], name[32]

  82.                

  83.                 get_user_authid(id, authid, 31)

  84.                 get_user_name(id, name, 31)

  85.                 log_amx("Vote: ^"%s<%d><%s><>^" cancel vote session", name, get_user_userid(id), authid)

  86.        

  87.  

  88.                 new maxpl=get_maxplayers();

  89.                 new msg[256];

  90.                 for (new i = 1; i <= maxpl; i++)

  91.                 {

  92.                         if (is_user_connected(i) && !is_user_bot(i))

  93.                         {

  94.                                 // HACK: ADMIN_CANC_VOTE_{1,2} keys were designed very poorly.  Remove all : and %s in it.

  95.                                 LookupLangKey(msg, charsmax(msg), "ADMIN_CANC_VOTE_1", i);

  96.                                 replace_all(msg, charsmax(msg), "%s", "");

  97.                                 replace_all(msg, charsmax(msg), ":", "");

  98.                                 trim(msg);

  99.                                 show_activity_id(i, id, name, msg);

  100.                         }

  101.                 }

  102.                

  103.                 console_print(id, "%L", id, "VOTING_CANC")

  104.                 ColorChat(0, NORMAL,"%L",LANG_PLAYER,"VOTING_CANC")

  105.                 remove_task(99889988, 1)

  106.                 set_cvar_float("amx_last_voting", get_gametime())

  107.         }

  108.         else

  109.                 console_print(id, "%L", id, "NO_VOTE_CANC")

  110.  

  111.         return PLUGIN_HANDLED

  112. }

  113.  

  114. public delayedExec(cmd[])

  115.         server_cmd("%s", cmd)

  116.  

  117. public autoRefuse()

  118. {

  119.         log_amx("Vote: %L", "en", "RES_REF")

  120.         ColorChat(0, NORMAL, "%L", LANG_PLAYER, "RES_REF")

  121. }

  122.  

  123. public actionResult(id, key)

  124. {

  125.         remove_task(4545454)

  126.        

  127.         switch (key)

  128.         {

  129.                 case 0:

  130.                 {

  131.                         set_task(2.0, "delayedExec", 0, g_Execute, g_execLen)

  132.                         log_amx("Vote: %L", "en", "RES_ACCEPTED")

  133.                         ColorChat(0, NORMAL,"%L", LANG_PLAYER, "RES_ACCEPTED")

  134.                 }

  135.                 case 1: autoRefuse()

  136.         }

  137.        

  138.         return PLUGIN_HANDLED

  139. }

  140.  

  141. public checkVotes()

  142. {

  143.         new best = 0

  144.        

  145.         if (!g_yesNoVote)

  146.         {

  147.                 for (new a = 0; a < 4; ++a)

  148.                         if (g_voteCount[a] > g_voteCount[best])

  149.                

  150.                 best = a

  151.         }

  152.  

  153.         new votesNum = g_voteCount[0] + g_voteCount[1] + g_voteCount[2] + g_voteCount[3]

  154.         new iRatio = votesNum ? floatround(g_voteRatio * float(votesNum), floatround_ceil) : 1

  155.         new iResult = g_voteCount[best]

  156.         new players[32], pnum, i

  157.        

  158.         get_players(players, pnum, "c")

  159.        

  160.         if (iResult < iRatio)

  161.         {

  162.                 new lVotingFailed[64]

  163.                

  164.                 for (i = 0; i < pnum; i++)

  165.                 {

  166.                         format(lVotingFailed, 63, "%L", players[i], "VOTING_FAILED")

  167.                         if (g_yesNoVote)

  168.                                 ColorChat(players[i], NORMAL, "%L", players[i], "VOTING_RES_1", lVotingFailed, g_voteCount[0], g_voteCount[1], iRatio)

  169.                         else

  170.                                 ColorChat(players[i], NORMAL, "%L", players[i], "VOTING_RES_2", lVotingFailed, iResult, iRatio)

  171.                 }

  172.                

  173.                 format(lVotingFailed, 63, "%L", "en", "VOTING_FAILED")

  174.                 log_amx("Vote: %s (got ^"%d^") (needed ^"%d^")", lVotingFailed, iResult, iRatio)

  175.                

  176.                 return PLUGIN_CONTINUE

  177.         }

  178.  

  179.         g_execLen = format(g_Execute, 255, g_Answer, g_optionName[best]) + 1

  180.        

  181.         if (g_execResult)

  182.         {

  183.                 g_execResult = false

  184.                

  185.                 if (is_user_connected(g_voteCaller))

  186.                 {

  187.                         new menuBody[512], lTheResult[32], lYes[16], lNo[16]

  188.                        

  189.                         format(lTheResult, 31, "%L", g_voteCaller, "THE_RESULT")

  190.                         format(lYes, 15, "%L", g_voteCaller, "YES")

  191.                         format(lNo, 15, "%L", g_voteCaller, "NO")

  192.                        

  193.                         new len = format(menuBody, 511, g_coloredMenus ? "\y%s: \w%s^n^n" : "%s: %s^n^n", lTheResult, g_Execute)

  194.                        

  195.                         len += format(menuBody[len], 511 - len, g_coloredMenus ? "\y%L^n\w" : "%L^n", g_voteCaller, "WANT_CONTINUE")

  196.                         format(menuBody[len], 511 - len, "^n1. %s^n2. %s", lYes, lNo)

  197.                         show_menu(g_voteCaller, 0x03, menuBody, 10, "The result: ")

  198.                         set_task(10.0, "autoRefuse", 4545454)

  199.                 }

  200.                 else

  201.                         set_task(2.0, "delayedExec", 0, g_Execute, g_execLen)

  202.         }

  203.        

  204.         new lVotingSuccess[32]

  205.        

  206.         for (i = 0; i < pnum; i++)

  207.         {

  208.                 format(lVotingSuccess, 31, "%L", players[i], "VOTING_SUCCESS")

  209.                 ColorChat(players[i], NORMAL, "%L", players[i], "VOTING_RES_3", lVotingSuccess, iResult, iRatio, g_Execute)

  210.         }

  211.        

  212.         format(lVotingSuccess, 31, "%L", "en", "VOTING_SUCCESS")

  213.         log_amx("Vote: %s (got ^"%d^") (needed ^"%d^") (result ^"%s^")", lVotingSuccess, iResult, iRatio, g_Execute)

  214.        

  215.         return PLUGIN_CONTINUE

  216. }

  217.  

  218. public voteCount(id, key)

  219. {

  220.         if (get_cvar_num("amx_vote_answers"))

  221.         {

  222.                 new name[32]

  223.                 get_user_name(id, name, 31)

  224.                

  225.                 if (g_yesNoVote)

  226.                         ColorChat(0, NORMAL, "%L", LANG_PLAYER, key ? "VOTED_AGAINST" : "VOTED_FOR", name)

  227.                 else

  228.                         ColorChat(0, NORMAL, "%L", LANG_PLAYER, "VOTED_FOR_OPT", name, key + 1)

  229.         }

  230.         ++g_voteCount[key]

  231.        

  232.         return PLUGIN_HANDLED

  233. }

  234.  

  235. public cmdVoteMap(id, level, cid)

  236. {

  237.         if (!cmd_access(id, level, cid, 2))

  238.                 return PLUGIN_HANDLED

  239.        

  240.         new Float:voting = get_cvar_float("amx_last_voting")

  241.         if (voting > get_gametime())

  242.         {

  243.                 console_print(id, "%L", id, "ALREADY_VOTING")

  244.                 return PLUGIN_HANDLED

  245.         }

  246.        

  247.         if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())

  248.         {

  249.                 console_print(id, "%L", id, "VOTING_NOT_ALLOW")

  250.                 return PLUGIN_HANDLED

  251.         }

  252.  

  253.         new argc = read_argc()

  254.         if (argc > 5) argc = 5

  255.        

  256.         g_validMaps = 0

  257.         g_optionName[0][0] = 0

  258.         g_optionName[1][0] = 0

  259.         g_optionName[2][0] = 0

  260.         g_optionName[3][0] = 0

  261.        

  262.         for (new i = 1; i < argc; ++i)

  263.         {

  264.                 read_argv(i, g_optionName[g_validMaps], 31)

  265.                

  266.                 if (is_map_valid(g_optionName[g_validMaps]))

  267.                         g_validMaps++

  268.         }

  269.        

  270.         if (g_validMaps == 0)

  271.         {

  272.                 new lMaps[16]

  273.                

  274.                 format(lMaps, 15, "%L", id, (argc == 2) ? "MAP_IS" : "MAPS_ARE")

  275.                 console_print(id, "%L", id, "GIVEN_NOT_VALID", lMaps)

  276.                 return PLUGIN_HANDLED

  277.         }

  278.  

  279.         new menu_msg[256], len = 0

  280.         new keys = 0

  281.        

  282.         if (g_validMaps > 1)

  283.         {

  284.                 keys = MENU_KEY_0

  285.                 len = format(menu_msg, 255, g_coloredMenus ? "\y%L: \w^n^n" : "%L: ^n^n", LANG_SERVER, "CHOOSE_MAP")

  286.                 new temp[128]

  287.                

  288.                 for (new a = 0; a < g_validMaps; ++a)

  289.                 {

  290.                         format(temp, 127, "%d.  %s^n", a+1, g_optionName[a])

  291.                         len += copy(menu_msg[len], 255-len, temp)

  292.                         keys |= (1<<a)

  293.                 }

  294.                

  295.                 format(menu_msg[len], 255-len, "^n0.  %L", LANG_SERVER, "NONE")

  296.                 g_yesNoVote = 0

  297.         } else {

  298.                 new lChangeMap[32], lYes[16], lNo[16]

  299.                

  300.                 format(lChangeMap, 31, "%L", LANG_SERVER, "CHANGE_MAP_TO")

  301.                 format(lYes, 15, "%L", LANG_SERVER, "YES")

  302.                 format(lNo, 15, "%L", LANG_SERVER, "NO")

  303.                 format(menu_msg, 255, g_coloredMenus ? "\y%s %s?\w^n^n1.  %s^n2.  %s" : "%s %s?^n^n1.  %s^n2.  %s", lChangeMap, g_optionName[0], lYes, lNo)

  304.                 keys = MENU_KEY_1|MENU_KEY_2

  305.                 g_yesNoVote = 1

  306.         }

  307.        

  308.         new authid[32], name[32]

  309.        

  310.         get_user_authid(id, authid, 31)

  311.         get_user_name(id, name, 31)

  312.        

  313.         if (argc == 2)

  314.                 log_amx("Vote: ^"%s<%d><%s><>^" vote map (map ^"%s^")", name, get_user_userid(id), authid, g_optionName[0])

  315.         else

  316.                 log_amx("Vote: ^"%s<%d><%s><>^" vote maps (map#1 ^"%s^") (map#2 ^"%s^") (map#3 ^"%s^") (map#4 ^"%s^")", name, get_user_userid(id), authid, g_optionName[0], g_optionName[1], g_optionName[2], g_optionName[3])

  317.  

  318.         new maxpl=get_maxplayers();

  319.         new msg[256];

  320.         for (new i = 1; i <= maxpl; i++)

  321.         {

  322.                 if (is_user_connected(i) && !is_user_bot(i))

  323.                 {

  324.                         // HACK: ADMIN_VOTE_MAP_{1,2} keys were designed very poorly.  Remove all : and %s in it.

  325.                         LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_MAP_1", i);

  326.                         replace_all(msg, charsmax(msg), "%s", "");

  327.                         replace_all(msg, charsmax(msg), ":", "");

  328.                         trim(msg);

  329.                         show_activity_id(i, id, name, msg);

  330.                 }

  331.         }

  332.  

  333.         g_execResult = true

  334.         new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0

  335.        

  336.         set_cvar_float("amx_last_voting", get_gametime() + vote_time)

  337.         g_voteRatio = get_cvar_float("amx_votemap_ratio")

  338.         g_Answer = "changelevel %s"

  339.         show_menu(0, keys, menu_msg, floatround(vote_time), (g_validMaps > 1) ? "Choose map: " : "Change map to ")

  340.         set_task(vote_time, "checkVotes", 99889988)

  341.         g_voteCaller = id

  342.         console_print(id, "%L", id, "VOTING_STARTED")

  343.         g_voteCount = {0, 0, 0, 0}

  344.        

  345.         return PLUGIN_HANDLED

  346. }

  347.  

  348. public cmdVote(id, level, cid)

  349. {

  350.         if (!cmd_access(id, level, cid, 4))

  351.                 return PLUGIN_HANDLED

  352.        

  353.         new Float:voting = get_cvar_float("amx_last_voting")

  354.         if (voting > get_gametime())

  355.         {

  356.                 console_print(id, "%L", id, "ALREADY_VOTING")

  357.                 return PLUGIN_HANDLED

  358.         }

  359.        

  360.         if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())

  361.         {

  362.                 console_print(id, "%L", id, "VOTING_NOT_ALLOW")

  363.                 return PLUGIN_HANDLED

  364.         }

  365.  

  366.         new quest[48]

  367.         read_argv(1, quest, 47)

  368.        

  369.         if ((contain(quest, "sv_password") != -1) || (contain(quest, "rcon_password") != -1) || (contain(quest, "kick") != -1) ||

  370.                 (contain(quest, "addip") != -1) || (contain(quest, "ban") != -1))

  371.         {

  372.                 console_print(id, "%L", id, "VOTING_FORBIDDEN")

  373.                 return PLUGIN_HANDLED

  374.         }

  375.        

  376.         new count=read_argc();

  377.  

  378.         for (new i=0;i<4 && (i+2)<count;i++)

  379.         {

  380.                 read_argv(i+2, g_optionName[i], sizeof(g_optionName[])-1);

  381.         }

  382.  

  383.         new authid[32], name[32]

  384.        

  385.         get_user_authid(id, authid, 31)

  386.         get_user_name(id, name, 31)

  387.         log_amx("Vote: ^"%s<%d><%s><>^" vote custom (question ^"%s^") (option#1 ^"%s^") (option#2 ^"%s^")", name, get_user_userid(id), authid, quest, g_optionName[0], g_optionName[1])

  388.  

  389.         new maxpl=get_maxplayers();

  390.         new msg[256];

  391.         for (new i = 1; i <= maxpl; i++)

  392.         {

  393.                 if (is_user_connected(i) && !is_user_bot(i))

  394.                 {

  395.                         // HACK: ADMIN_VOTE_CUS_{1,2} keys were designed very poorly.  Remove all : and %s in it.

  396.                         LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_CUS_1", i);

  397.                         replace_all(msg, charsmax(msg), "%s", "");

  398.                         replace_all(msg, charsmax(msg), ":", "");

  399.                         trim(msg);

  400.                         show_activity_id(i, id, name, msg);

  401.                 }

  402.         }

  403.  

  404.         new menu_msg[512], lVote[16]

  405.        

  406.         format(lVote, 15, "%L", LANG_SERVER, "VOTE")

  407.        

  408.         count-=2;

  409.         if (count>4)

  410.         {

  411.                 count=4;

  412.         }

  413.         // count now shows how many options were listed

  414.         new keys=0;

  415.         for (new i=0;i<count;i++)

  416.         {

  417.                 keys |= (1<<i);

  418.         }

  419.        

  420.         new len=formatex(menu_msg, sizeof(menu_msg)-1, g_coloredMenus ? "\y%s: %s\w^n^n" : "%s: %s^n^n", lVote, quest);

  421.        

  422.         for (new i=0;i<count;i++)

  423.         {

  424.                 len+=formatex(menu_msg[len], sizeof(menu_msg) - 1 - len ,"%d.  %s^n",i+1,g_optionName[i]);

  425.         }

  426.         g_execResult = false

  427.        

  428.         new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0

  429.        

  430.         set_cvar_float("amx_last_voting", get_gametime() + vote_time)

  431.         g_voteRatio = get_cvar_float("amx_vote_ratio")

  432.         replace_all(quest,sizeof(quest)-1,"%","");

  433.         format(g_Answer, 127, "%s - %%s", quest)

  434.         show_menu(0, keys, menu_msg, floatround(vote_time), "Vote: ")

  435.         set_task(vote_time, "checkVotes", 99889988)

  436.         g_voteCaller = id

  437.         console_print(id, "%L", id, "VOTING_STARTED")

  438.         g_voteCount = {0, 0, 0, 0}

  439.         g_yesNoVote = 0

  440.        

  441.         return PLUGIN_HANDLED

  442. }

  443.  

  444. public cmdVoteKickBan(id, level, cid)

  445. {

  446.         if (!cmd_access(id, level, cid, 2))

  447.                 return PLUGIN_HANDLED

  448.        

  449.         new Float:voting = get_cvar_float("amx_last_voting")

  450.         if (voting > get_gametime())

  451.         {

  452.                 console_print(id, "%L", id, "ALREADY_VOTING")

  453.                 return PLUGIN_HANDLED

  454.         }

  455.  

  456.         if (voting && voting + get_cvar_float("amx_vote_delay") > get_gametime())

  457.         {

  458.                 console_print(id, "%L", id, "VOTING_NOT_ALLOW")

  459.                 return PLUGIN_HANDLED

  460.         }

  461.  

  462.         new cmd[32]

  463.        

  464.         read_argv(0, cmd, 31)

  465.        

  466.         new voteban = equal(cmd, "amx_voteban")

  467.         new arg[32]

  468.         read_argv(1, arg, 31)

  469.        

  470.         new player = cmd_target(id, arg, CMDTARGET_OBEY_IMMUNITY | CMDTARGET_ALLOW_SELF)

  471.        

  472.         if (!player)

  473.                 return PLUGIN_HANDLED

  474.        

  475.         if (voteban && is_user_bot(player))

  476.         {

  477.                 new imname[32]

  478.                

  479.                 get_user_name(player, imname, 31)

  480.                 console_print(id, "%L", id, "ACTION_PERFORMED", imname)

  481.                 return PLUGIN_HANDLED

  482.         }

  483.  

  484.         new keys = MENU_KEY_1|MENU_KEY_2

  485.         new menu_msg[256], lYes[16], lNo[16], lKickBan[16]

  486.        

  487.         format(lYes, 15, "%L", LANG_SERVER, "YES")

  488.         format(lNo, 15, "%L", LANG_SERVER, "NO")

  489.         format(lKickBan, 15, "%L", LANG_SERVER, voteban ? "BAN" : "KICK")

  490.         ucfirst(lKickBan)

  491.         get_user_name(player, arg, 31)

  492.         format(menu_msg, 255, g_coloredMenus ? "\y%s %s?\w^n^n1.  %s^n2.  %s" : "%s %s?^n^n1.  %s^n2.  %s", lKickBan, arg, lYes, lNo)

  493.         g_yesNoVote = 1

  494.        

  495.         new bool:ipban=false;

  496.        

  497.         if (voteban)

  498.         {

  499.                 get_user_authid(player, g_optionName[0], sizeof(g_optionName[])-1);

  500.                

  501.                 // Do the same check that's in plmenu to determine if this should be an IP ban instead

  502.                 if (equal("4294967295", g_optionName[0])

  503.                         || equal("HLTV", g_optionName[0])

  504.                         || equal("STEAM_ID_LAN", g_optionName[0])

  505.                         || equali("VALVE_ID_LAN", g_optionName[0]))

  506.                 {

  507.                         get_user_ip(player, g_optionName[0], sizeof(g_optionName[])-1, 1);

  508.                        

  509.                         ipban=true;

  510.                 }

  511.  

  512.         }

  513.         else

  514.         {

  515.                 num_to_str(get_user_userid(player), g_optionName[0], 31)

  516.         }

  517.        

  518.         new authid[32], name[32]

  519.        

  520.         get_user_authid(id, authid, 31)

  521.         get_user_name(id, name, 31)

  522.         log_amx("Vote: ^"%s<%d><%s><>^" vote %s (target ^"%s^")", name, get_user_userid(id), authid, voteban ? "ban" : "kick", arg)

  523.  

  524.         new maxpl=get_maxplayers();

  525.         new msg[256];

  526.         new right[256];

  527.         new dummy[1];

  528.         for (new i = 1; i <= maxpl; i++)

  529.         {

  530.                 if (is_user_connected(i) && !is_user_bot(i))

  531.                 {

  532.                         formatex(lKickBan, charsmax(lKickBan), "%L", i, voteban ? "BAN" : "KICK");

  533.                        

  534.                         // HACK: ADMIN_VOTE_FOR{1,2} keys are really weird.  Tokenize and ignore the text before the :

  535.                         LookupLangKey(msg, charsmax(msg), "ADMIN_VOTE_FOR_1", i);

  536.                         strtok(msg, dummy, 0, right, charsmax(right), ':');

  537.                         trim(right);

  538.                         show_activity_id(i, id, name, right, lKickBan, arg);

  539.                 }

  540.         }

  541.  

  542.         g_execResult = true

  543.        

  544.         new Float:vote_time = get_cvar_float("amx_vote_time") + 2.0

  545.        

  546.         set_cvar_float("amx_last_voting", get_gametime() + vote_time)

  547.         g_voteRatio = get_cvar_float(voteban ? "amx_voteban_ratio" : "amx_votekick_ratio")

  548.  

  549.         if (voteban)

  550.         {

  551.                 if (ipban==true)

  552.                 {

  553.                         g_Answer = "addip 30.0 %s";

  554.                 }

  555.                 else

  556.                 {

  557.                         g_Answer = "banid 30.0 %s kick";

  558.  

  559.                 }

  560.         }

  561.         else

  562.         {

  563.                 g_Answer = "kick #%s";

  564.         }

  565.         show_menu(0, keys, menu_msg, floatround(vote_time), voteban ? "Ban " : "Kick ")

  566.         set_task(vote_time, "checkVotes", 99889988)

  567.         g_voteCaller = id

  568.         console_print(id, "%L", id, "VOTING_STARTED")

  569.         g_voteCount = {0, 0, 0, 0}

  570.        

  571.         return PLUGIN_HANDLED

  572. }

  573.  


A hozzászólást 1 alkalommal szerkesztették, utoljára oroszrulett 2012.06.13. 17:42-kor.

Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 17:39 
Offline
Őstag
Avatar

Csatlakozott: 2010.04.16. 16:50
Hozzászólások: 1342
Megköszönt másnak: 42 alkalommal
Megköszönték neki: 58 alkalommal
valami helyesbítőt kell bele rakni mint a kör üzenet pluginnál nem??
!g
!t

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 17:43 
Offline
Veterán
Avatar

Csatlakozott: 2011.06.07. 15:29
Hozzászólások: 1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
Nem. Attól még nem lesz semmi változás. Fentebb leírtam a választ!
700 HSZ


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:13 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2011.09.18. 13:01
Hozzászólások: 4270
Megköszönt másnak: 55 alkalommal
Megköszönték neki: 513 alkalommal
Na langba is ugyan ugy kell mint chatbe csak az sma-ba a reszeket kell atszinezni.

_________________
Idk. Csak ugy funbooo.
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:14 
Offline
Őstag
Avatar

Csatlakozott: 2010.04.16. 16:50
Hozzászólások: 1342
Megköszönt másnak: 42 alkalommal
Megköszönték neki: 58 alkalommal
DeteCT0R írta:
Na langba is ugyan ugy kell mint chatbe csak az sma-ba a reszeket kell atszinezni.

Erre tudsz nekem mutatni egy példát Detector?

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:15 
Offline
Veterán
Avatar

Csatlakozott: 2011.06.07. 15:29
Hozzászólások: 1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
Már átírtam fentebb...
Példa :
Kód:
  1. client_print(0, print_chat, "%L", ...)

helyett
Kód:
  1. ColorChat(0, NORMAL, "%L", ...)


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:22 
Offline
Tiszteletbeli
Avatar

Csatlakozott: 2011.09.18. 13:01
Hozzászólások: 4270
Megköszönt másnak: 55 alkalommal
Megköszönték neki: 513 alkalommal
Tessek teljeskoru pelda csak zp-bol vettem ki
Kód:
  1.  

  2. zp_colored_print(0, "^x04[FaceBook]^x01 %L", LANG_PLAYER, "LIKE_INFO")

  3.  

--->

Kód:
  1. zp_colored_print >> ColorChat

_________________
Idk. Csak ugy funbooo.
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:30 
Offline
Őstag
Avatar

Csatlakozott: 2010.04.16. 16:50
Hozzászólások: 1342
Megköszönt másnak: 42 alkalommal
Megköszönték neki: 58 alkalommal
köszi, így már érthető !

_________________
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: lang ba írás szinesen
HozzászólásElküldve: 2012.06.13. 18:32 
Offline
Veterán
Avatar

Csatlakozott: 2011.06.07. 15:29
Hozzászólások: 1728
Megköszönt másnak: 1 alkalommal
Megköszönték neki: 63 alkalommal
Kieg.: Langfájlban is ugyanígy kell használni.
Kód:
  1. ASD_ASD = ^x04 Szia cica!^x03 Van gazdád?


Hozzászólás jelentése
Vissza a tetejére
   
Hozzászólások megjelenítése:  Rendezés  
Új téma nyitása  Hozzászólás a témához  [ 19 hozzászólás ]  Oldal 1 2 Következő


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 81 vendég


Nyithatsz új témákat ebben a fórumban.
Válaszolhatsz egy témára ebben a fórumban.
Nem szerkesztheted a hozzászólásaidat ebben a fórumban.
Nem törölheted a hozzászólásaidat ebben a fórumban.
Nem küldhetsz csatolmányokat ebben a fórumban.

Keresés:
Ugrás:  
Powered by phpBB® Forum Software © phpBB Limited
Magyar fordítás © Magyar phpBB Közösség
Portal: Kiss Portal Extension © Michael O'Toole