hlmod.hu
https://hlmod.hu/

Fraglopás hiba konzol
https://hlmod.hu/viewtopic.php?f=9&t=27040
Oldal: 1 / 1

Szerző:  Coca-Cola [ 2017.01.09. 18:17 ]
Hozzászólás témája:  Fraglopás hiba konzol

Sziasztok van bent aszerveremen a fraglopás plugin és az lenen a gond hogy a hibakonzolban ezt az üzenetet kapom meglehetne valahogy oldani hogy ne dobjon errort?
L 01/09/2017 - 18:03:58: [FUN] Invalid player 5
L 01/09/2017 - 18:03:58: [AMXX] Displaying debug trace (plugin "lopas.amxx")
L 01/09/2017 - 18:03:58: [AMXX] Run time error 10: native error (native "set_user_frags")
L 01/09/2017 - 18:03:58: [AMXX] [0] 5q4smjc0.sma.p::halal_event (line 59)

Szerző:  kengurumancs [ 2017.01.09. 18:31 ]
Hozzászólás témája:  Re: Fraglopás hiba konzol

Helló.
Melyik pluginról lenne szó?

Szerző:  theglorious [ 2017.01.09. 18:32 ]
Hozzászólás témája:  Re: Fraglopás hiba konzol

Coca-Cola írta:
Sziasztok van bent aszerveremen a fraglopás plugin és az lenen a gond hogy a hibakonzolban ezt az üzenetet kapom meglehetne valahogy oldani hogy ne dobjon errort?
L 01/09/2017 - 18:03:58: [FUN] Invalid player 5
L 01/09/2017 - 18:03:58: [AMXX] Displaying debug trace (plugin "lopas.amxx")
L 01/09/2017 - 18:03:58: [AMXX] Run time error 10: native error (native "set_user_frags")
L 01/09/2017 - 18:03:58: [AMXX] [0] 5q4smjc0.sma.p::halal_event (line 59)

Kellene hozzá a plugin is...

Szerző:  Coca-Cola [ 2017.01.09. 18:33 ]
Hozzászólás témája:  Re: Fraglopás hiba konzol

Tessék itt a forráskód is.

Csatolmányok:
lopas.sma [1.38 KiB]
Letöltve 64 alkalommal.

Szerző:  kengurumancs [ 2017.01.09. 18:38 ]
Hozzászólás témája:  Re: Fraglopás hiba konzol

  1. #include <amxmodx>
  2. #include <fun>
  3. #include <cstrike>
  4.  
  5. new const PREFIX[] = "WorldSniper"
  6.  
  7. // Vedd ki a // jelet a # elől, ha azonnal frissíteni szeretnéd a fragek számát elosztáskor, nem csak kör elején.
  8. #define LIVE_UPDATE
  9.  
  10. #define IsValidPlayers(%1,%2) ((1 <= %1 <= 32) && (1 <= %2 <= 32))
  11.  
  12. new g_iAssist[33];
  13. new g_iAssDamage[33][33];
  14.  
  15. public plugin_init()
  16. {
  17.     register_plugin("Lite Kill Assists", "1.17", "neygomon");
  18.    
  19.     register_event("HLTV",     "eRoundStart", "a", "1=0", "2=0");
  20.     register_event("DeathMsg", "eDeathMsg", "a", "1>0");
  21.     register_event("Damage",   "eDamage", "be", "2!0", "3=0", "4!0");
  22. }
  23.  
  24. public client_disconnect(id)
  25.     ResetAssist(id);
  26.  
  27. public eRoundStart()
  28. {
  29.     new pl[32], pnum; get_players(pl, pnum);
  30.     for(new i; i < pnum; i++)
  31.         ResetAssist(pl[i]);
  32. }
  33.    
  34. public eDeathMsg()
  35. {
  36.     static pKiller, pVictim;
  37.     pKiller = read_data(1);
  38.     pVictim = read_data(2);
  39.     if(pKiller == pVictim || pKiller == g_iAssist[pVictim] || !is_user_connected(g_iAssist[pVictim])) return;
  40.    
  41.     cs_set_user_money(g_iAssist[pVictim], cs_get_user_money(g_iAssist[pVictim]) + 300);
  42.     static iFrags; iFrags = get_user_frags(g_iAssist[pVictim]) + 1;
  43.     set_user_frags(g_iAssist[pVictim], iFrags);
  44. #if defined LIVE_UPDATE
  45.     static mScoreInfo; if(!mScoreInfo) mScoreInfo = get_user_msgid("ScoreInfo");
  46.     message_begin(MSG_ALL, mScoreInfo);
  47.     write_byte(g_iAssist[pVictim]);
  48.     write_short(iFrags);
  49.     write_short(get_user_deaths(g_iAssist[pVictim]));
  50.     write_short(0);
  51.     write_short(get_user_team(g_iAssist[pVictim]));
  52.     message_end();
  53. #endif
  54.     static victim[32];
  55.     get_user_name(pVictim, victim, charsmax(victim));
  56.     ChatColor(g_iAssist[pVictim], "^4[%s] ^1Kaptál ^4+1 ^1fraget, mert segítettél ^3%s ^1megölésében.", PREFIX, victim)
  57.     ResetAssist(pVictim);
  58. }
  59.  
  60. public eDamage(id)
  61. {
  62.     static pAttacker; pAttacker = get_user_attacker(id);
  63.     if(id == pAttacker || !IsValidPlayers(id, pAttacker)) return;
  64.     g_iAssDamage[id][pAttacker] += read_data(2);
  65.     if(!g_iAssist[id] && g_iAssDamage[id][pAttacker] >= 50)
  66.         g_iAssist[id] = pAttacker;
  67. }
  68.  
  69. ResetAssist(id)
  70. {
  71.     g_iAssist[id] = 0;
  72.     arrayset(g_iAssDamage[id], 0, sizeof g_iAssDamage[]);
  73. }
  74.  
  75. stock ChatColor(const id, const szMessage[], any:...) {
  76.     static pnum, players[32], szMsg[190], IdMsg;
  77.     vformat(szMsg, charsmax(szMsg), szMessage, 3);
  78.    
  79.     if(!IdMsg) IdMsg = get_user_msgid("SayText");
  80.    
  81.     if(id) {
  82.         if(!is_user_connected(id)) return;
  83.         players[0] = id;
  84.         pnum = 1;
  85.     }
  86.     else get_players(players, pnum, "ch");
  87.    
  88.     for(new i; i < pnum; i++) {
  89.         message_begin(MSG_ONE, IdMsg, .player = players[i]);
  90.         write_byte(players[i]);
  91.         write_string(szMsg);
  92.         message_end();
  93.     }
  94. }

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