hlmod.hu
https://hlmod.hu/

Üzenet mindenkinek
https://hlmod.hu/viewtopic.php?f=9&t=23110
Oldal: 1 / 1

Szerző:  Just a Newbie. :* [ 2015.12.21. 19:32 ]
Hozzászólás témája:  Üzenet mindenkinek

Sziasztok! Azt szeretném kérdezni, hogyan lehetne megoldani, hogy egy adott üzenetet mindenki lásson, aki fent van a szerveren?

Pl: /rs: Sikeresen nulláztad a statisztikád.
helyett: *player* Nullázta a statisztikáját.

Szerző:  Anonymous1337 [ 2015.12.21. 19:36 ]
Hozzászólás témája:  Re: Üzenet mindenkinek

Tessék:

  1. case 0:
  2.         {
  3.             if(cmd_limit > 0)
  4.             {
  5.                 if(limit_left == 0) ColorChat(id, TEAM_COLOR, "%s ^3Nem tudod többször nullázni ^1a ^4statisztikád^1.", szPrefix)
  6.                 else ColorChat(id, TEAM_COLOR, "%s ^1Sikeresen ^3nulláztad ^1a ^4statisztikád^1. Még megteheted ezt ^3%ix^1.", szPrefix, limit_left)
  7.             }
  8.             else ColorChat(id, TEAM_COLOR, "%s ^1Sikeresen ^3nulláztad ^1a ^4statisztikád^1.", szPrefix)
  9.         }
  10.         case 1:
  11.         {
  12.             new name[32]
  13.             get_user_name(id, name, charsmax(name))
  14.  
  15.             if(cmd_limit > 0) ColorChat(0, TEAM_COLOR, "%s ^3%s ^4nullázta a statisztikáját ^1[^4Limit: ^3%i^1/^3%i^1]", szPrefix, name, limit[id], cmd_limit)
  16.             else ColorChat(0, TEAM_COLOR, "%s ^3%s ^4nullázta ^1a ^4statisztikáját^1.", szPrefix, name)
  17.         }
  18.     }


UI: Az aláírásodban szereplő képet, ajánlom kicsinyítsd le, mert letörlik.

Szerző:  PistaCFG [ 2015.12.21. 20:32 ]
Hozzászólás témája:  Re: Üzenet mindenkinek

  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4. #include <amxmisc>
  5. #include <cstrike>
  6. #include <colorchat>
  7. #include <fun>
  8.  
  9. #define PLUGIN "New Plug-In"
  10. #define VERSION "1.0"
  11. #define AUTHOR "Pista"
  12.  
  13.  
  14. public plugin_init() {
  15.     register_plugin(PLUGIN, VERSION, AUTHOR)
  16.     register_clcmd("say /rs", "stat")
  17. }
  18. public stat(id)
  19. {
  20.     new nev[32]
  21.     get_user_name(id, nev, 31)
  22.    
  23.     set_user_frags(id, 0)
  24.     cs_set_user_deaths(id, 0)
  25.     ColorChat(0, GREEN, "[Információ]^3 %s^1 Nullázta a Statisztikáját", nev)
  26. }

Szerző:  mforce [ 2015.12.21. 21:06 ]
Hozzászólás témája:  Re: Üzenet mindenkinek

  1. #include <amxmodx>
  2. #include <fakemeta>
  3.  
  4. #define PLUGIN "ResetScore"
  5. #define VERSION "1.0"
  6. #define AUTHOR "mforce"
  7.  
  8. public plugin_init() {
  9.     register_clcmd("say /rs", "reset")
  10.     register_clcmd("say /resetscore", "reset")
  11.     register_clcmd("say !resetscore", "reset")
  12.     register_clcmd("say !rs", "reset")
  13.     register_clcmd("say_team /rs", "reset")
  14.     register_clcmd("say_team /resetscore", "reset")
  15.     register_clcmd("say_team !resetscore", "reset")
  16.     register_clcmd("say_team !rs", "reset")
  17. }
  18.  
  19. public reset(id) {
  20.     if(is_user_connected(id)) {
  21.         client_cmd(id, "spk buttons/blip1.wav");
  22.         new name[32]; get_user_name(id, name, charsmax(name));
  23.         ChatColor(0, "^4[ProKillers]^3 %s ^1nullázta a statisztikáját." name);
  24.  
  25.         set_pev(id, pev_frags, 0.0);
  26.         set_pdata_int(id, 444, 0);
  27.        
  28.         static mScoreInfo; if(!mScoreInfo) mScoreInfo = get_user_msgid("ScoreInfo");
  29.         message_begin(MSG_ALL, mScoreInfo);
  30.         write_byte(id);
  31.         write_short(0);
  32.         write_short(0);
  33.         write_short(0);
  34.         write_short(0);
  35.         message_end();
  36.     }
  37.     return PLUGIN_HANDLED;
  38. }
  39.  
  40. stock ChatColor(const id, const szMessage[], any:...) {
  41.     static pnum, players[32], szMsg[190], IdMsg;
  42.     vformat(szMsg, charsmax(szMsg), szMessage, 3);
  43.  
  44.     if(!IdMsg) IdMsg = get_user_msgid("SayText");
  45.  
  46.     if(id) {
  47.         if(!is_user_connected(id)) return;
  48.         players[0] = id;
  49.         pnum = 1;
  50.     }
  51.     else get_players(players, pnum, "ch");
  52.  
  53.     for(new i; i < pnum; i++) {
  54.         message_begin(MSG_ONE, IdMsg, .player = players[i]);
  55.         write_byte(players[i]);
  56.         write_string(szMsg);
  57.         message_end();
  58.     }
  59. }

Oldal: 1 / 1 Minden időpont UTC+02:00 időzóna szerinti
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/