It is currently 19 Sep 2018 06:14






Reply to topic  [ 2 posts ] 
 Am nevoie de explicatie la acest script 
Author Message
Membru, skill 0
Membru, skill 0

Joined: 25 Sep 2012 11:07
Posts: 11
Detinator Steam: Da
CS Status: Citesc forumul eXtreamCS.com...!
Fond eXtream: 0
Salut.Va rog sa imi explicati si mie fiecare parte din acest plugin,pentru ca nu ma prind cum functioneaza...
*Este un bullet dmg shower
Si daca se poate sa imi spuneti ce sunt cifrele alea de la hud msg si ce inseamna variabila static

Code:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta_util>

#define PLUGIN "Advanced Bullet Damage"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"

new g_type, g_enabled, g_recieved, bool:g_showrecieved, g_hudmsg1, g_hudmsg2

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   register_event("Damage", "on_damage", "b", "2!0", "3=0", "4!0")   
   register_event("HLTV", "on_new_round", "a", "1=0", "2=0")
   
   g_type = register_cvar("amx_bulletdamage","1")
   g_recieved = register_cvar("amx_bulletdamage_recieved","1")   
   
   g_hudmsg1 = CreateHudSyncObj()   
   g_hudmsg2 = CreateHudSyncObj()
}

public on_new_round()
{
   g_enabled = get_pcvar_num(g_type)
   if(get_pcvar_num(g_recieved)) g_showrecieved = true   
}

public on_damage(id)
{
   if(g_enabled)
   {      
      static attacker; attacker = get_user_attacker(id)
      static damage; damage = read_data(2)      
      if(g_showrecieved)
      {         
         set_hudmessage(255, 0, 0, 0.45, 0.50, 2, 0.1, 4.0, 0.1, 0.1, -1)
         ShowSyncHudMsg(id, g_hudmsg2, "%i^n", damage)      
      }
      if(is_user_connected(attacker))
      {
         switch(g_enabled)
         {
            case 1: {
               set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
               ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)            
            }
            case 2: {
               if(fm_is_ent_visible(attacker,id))
               {
                  set_hudmessage(0, 100, 200, -1.0, 0.55, 2, 0.1, 4.0, 0.02, 0.02, -1)
                  ShowSyncHudMsg(attacker, g_hudmsg1, "%i^n", damage)            
               }
            }
         }
      }
   }
}


17 Mar 2018 23:26
Profile multumesc WWW
Fost moderator
Fost moderator
User avatar

Joined: 07 Oct 2014 18:49
Posts: 1268
Location: Republica Moldova, Chișinău
Detinator Steam: Da
CS Status: I <3 Heavy Metal
Detinator server CS: CS.MIEZ.RO
SteamID: dogseatmypancreas
Reputatie: Fost moderator ajutator
Fost Membru Club eXtreamCS (doua luni)
Fond eXtream: 0
amxmodx wrote:
ce sunt cifrele alea de la hud msg

https://www.amxmodx.org/api/amxmodx/set_hudmessage

amxmodx wrote:
ce inseamna variabila static

https://forums.alliedmods.net/showthread.php?t=40340

_________________
Server: ReHLDS 3.4.0.633-dev, ReGameDLL 5.5.0.290-dev, Metamod-r v1.3.0.110, AMX Mod X 1.8.3-dev+5151
OS: Debian 8

Image


17 Mar 2018 23:43
Profile multumesc WWW
Display posts from previous:  Sort by  
Reply to topic   [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 10 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