It is currently 21 Nov 2018 23:06






Reply to topic  [ 1 post ] 
 error 034 ajutor 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 08 Jan 2017 19:54
Posts: 27
Detinator Steam: Nu
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
buna seara la toata lumea am un plugin la care am facut niste modificari in el si la compilare imi da eroare asta de 7 ori
| Afiseaza codul
[
error 034: argument does not have a default value (argument 2)


Code:
#include <amxmodx>
#include <ColorChat>
#define CHAT_PREFIX "DeathStats"
#define is_player(%0) (32 >= %0 >= 1)

new const g_szHIT_NAMES[][] =
{
   "Body",
   "Head",
   "Chest",
   "Stomach",
   "Left Hend",
   "Right Hend",
   "Left Leg",
   "Right Leg"   
}

enum _:DATA
{
   DMGCOUNT,
   DMGVALUE,
   
   ATT_ID,
   ATT_NAME[32],
   ATT_HP,
   ATT_AR,
   ATT_WPN[32],
   ATT_DIST
}

new g_eDMG[33][DATA];
new g_iHITS[33][8];

public plugin_init()
{
   register_plugin("STATS", "1", "brown_dev");
   
   register_event("Damage", "EVENT_Damage", "b", "2!0", "4!0"); // was before 3=0 bullet dmg only
   register_event("HLTV", "event_HLTV", "a", "1=0", "2=0");
   
   register_clcmd("say /me", "ShowME");
   register_clcmd("say /hp", "ShowHP");
   register_clcmd("say_team /me", "ShowME");
   register_clcmd("say_team /hp", "ShowHP");
}

public EVENT_Damage(id)
{
   static at, wpn, body;
   at = get_user_attacker(id, wpn, body)
   
   if( !is_player(at) || !is_user_connected(at) ) return;
   
   
   g_eDMG[at][DMGCOUNT] ++;
   g_eDMG[at][DMGVALUE] += read_data(2);
   
   g_iHITS[at][body] ++;
   
   //instead DeathMsg Event
   if( is_user_connected(id) && !is_user_alive(id) )
   {
      static vOr[3], aOr[3];
      
      get_user_origin(id, vOr);
      get_user_origin(at, aOr);
      
      get_user_name(at, g_eDMG[id][ATT_NAME], 31);
      
      get_weaponname(wpn, g_eDMG[id][ATT_WPN], 31);
      replace(g_eDMG[id][ATT_WPN], 31, "weapon_", "");
      ucfirst(g_eDMG[id][ATT_WPN]);
      
      g_eDMG[id][ATT_ID] = at;
      g_eDMG[id][ATT_HP] = get_user_health(at);
      g_eDMG[id][ATT_AR] = get_user_armor(at);
      g_eDMG[id][ATT_DIST] = get_distance(vOr, aOr);   //can do it with engine, but why?
   }
}

public event_HLTV()
{
   for ( new i = 1; i < 33; i ++ )
   {
      g_eDMG[i][DMGCOUNT] =   g_eDMG[i][DMGVALUE] =   
      g_eDMG[i][ATT_HP] =   g_eDMG[i][ATT_DIST] =      g_eDMG[i][ATT_ID] =
      g_eDMG[i][ATT_AR] =   g_eDMG[i][ATT_NAME][0] =   g_eDMG[i][ATT_WPN][0] = 0;
      
      g_iHITS[i][1] =    g_iHITS[i][2] =      
      g_iHITS[i][3] =      g_iHITS[i][4] =
      g_iHITS[i][5] =      g_iHITS[i][6] = g_iHITS[i][7] = 0;
   }
}

public ShowME(id)
{
   if( is_user_alive(id) )
   {
      ColorChat(id, _, "^x04[%s]^x01 Available only for deads.", CHAT_PREFIX);
      return;
   }
   
   if( !g_eDMG[id][DMGCOUNT] )
   {
      ColorChat(id, _, "^x04[%s]^x01 Data settings is updated.", CHAT_PREFIX);
      return;
   }
   
   new szBuffer[128];
   get_hits(id, szBuffer, 127)
   
   ColorChat(id, _, "^x04[%s]^x01 Result:^x04 %d^x01 hits,^x04 %d^x01 damage.", CHAT_PREFIX, g_eDMG[id][DMGCOUNT], g_eDMG[id][DMGVALUE]);
   ColorChat(id, _, "^x04[%s]^x01 Body hits:^x04 %s^x01", CHAT_PREFIX, szBuffer);
}

public ShowHP(id)
{
   if( !g_eDMG[id][ATT_ID] )
   {
      ColorChat(id, _, "^x04[%s]^x01 Data settings is updated.", CHAT_PREFIX);
      return;
   }
   
   new szBuffer[128];
   get_hits(g_eDMG[id][ATT_ID], szBuffer, 127);
   
   ColorChat(id, _, "^x04[%s]^x01 Killer:^x03 %s^x01 Weapon:^x04 %s^x01 Distance:^x04 %d^x01 (^x03 %d^x01 Health Points |^x03%d ^x01Armor).", CHAT_PREFIX, g_eDMG[id][ATT_NAME], g_eDMG[id][ATT_WPN], g_eDMG[id][ATT_DIST], g_eDMG[id][ATT_HP], g_eDMG[id][ATT_AR]);
   ColorChat(id, _, "^x04[%s]^x01 Body hits:^x04 %s^x01", CHAT_PREFIX, szBuffer)
}

get_hits(id, buffer[], len)
{
   for ( new hit = 1; hit < 8; hit ++ )
   {
      if(g_iHITS[id][hit])
      {
         format(buffer, len, "%s ^1%s ^3%d", buffer, g_szHIT_NAMES[hit], g_iHITS[id][hit])
      }
   }
}





Asta e codul ajutatima cu eroarea varog.


12 Jan 2018 01:19
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 1 post ] 

Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

În cazul în care aveți probleme cu contul trimiteți un email sau mesaj la servicii_extream[arond]yahoo[punct]com

Powered by phpBB® Forum Software © phpBB Group