hlmod.hu

Magyar Half-Life Mód közösség!
Pontos idő: 2024.06.16. 07:08



Jelenlévő felhasználók

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

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

Regisztrált felhasználók: Bing [Bot] 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  [ 2 hozzászólás ] 
Szerző Üzenet
 Hozzászólás témája: [ZP] Extra : Golden M4A1 (Orosz)
HozzászólásElküldve: 2013.08.22. 02:07 
Offline
Minden6ó
Avatar

Csatlakozott: 2011.01.19. 12:14
Hozzászólások: 4292
Megköszönt másnak: 219 alkalommal
Megköszönték neki: 287 alkalommal
Estét! :)
Valaki le fordítaná ezt nekem?

SMA Forráskód: [ Mindet kijelol ]
  1. /*************************************************************************************
  2.   [ZP] Thunder Carabine by Lucas_7_94 For Allied Mods .
  3. ***************************************************************************************/
  4.  
  5.  
  6. #include <amxmodx>
  7. #include <amxmisc>
  8. #include <zombieplague>
  9. #include <fun>
  10. #include <hamsandwich>
  11. #include <engine>
  12. #include <fakemeta>
  13.  
  14. #define NAME "[ZP] Extra Item : Gold M4A1"
  15. #define VERSION "v1.5"
  16. #define CREATOR "lucas_7_94 and Van"
  17.  
  18. // Put Your Model =D
  19. new const v_thunder[] = "models/zombie_plague/v_g_m4a1.mdl"
  20. new const p_thunder[] = "models/zombie_plague/p_g_m4a1.mdl"
  21.  
  22. // Put The Cost For The Plugin
  23. new const g_thunder_cost = 60
  24.  
  25. /*==========Customization==========*/
  26. new bool: g_HasThunderCarabine[33]
  27. new Thunder, g_thunder, g_maxplayers
  28. new cvar_carbine_damage
  29. new cvar_say, cvar_sounds
  30. new cvar_round_started, cvar_logs
  31. /*===== End Customization ======*/
  32.  
  33. #define is_valid_player(%1) (1 <= %1 <= g_maxplayers) // Thanks You meTaLicross's gauss. =D
  34.  
  35. public plugin_init()
  36. {
  37. register_plugin(NAME, VERSION, CREATOR)
  38. register_cvar("Thunder Carabine", VERSION, (FCVAR_SERVER | FCVAR_SPONLY))
  39. register_clcmd("drop", "clcmd_drop")
  40.  
  41. // Events And Others
  42. register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
  43.  
  44. RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  45. RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
  46. RegisterHam(Ham_Spawn, "player", "fw_player_spawn", 1)
  47.  
  48. // Cvars For Item
  49. cvar_say = register_cvar("zp_thunder_says", "0")
  50. cvar_sounds = register_cvar("zp_thunder_sounds", "1")
  51. cvar_logs = register_cvar("zp_thunder_logs", "0")
  52. cvar_round_started = register_cvar("zp_thunder_buy_started", "1")
  53. cvar_carbine_damage = register_cvar("zp_thunder_damage", "5.0")
  54.  
  55. // Register the Plugin =D
  56. g_thunder = zp_register_extra_item("Arany M4A1", g_thunder_cost, ZP_TEAM_HUMAN);
  57.  
  58. // Maxplayers and the sucking Screenfade l0l D:
  59. g_maxplayers = get_maxplayers()
  60.  
  61. }
  62. public plugin_precache()
  63. {
  64. Thunder = precache_model("sprites/lgtning.spr");
  65. precache_sound( "ambience/thunder_clap.wav" )
  66. precache_model(v_thunder)
  67. precache_model(p_thunder)
  68. }
  69.  
  70. public client_disconnect(id) g_HasThunderCarabine[id] = false;
  71.  
  72. public client_putinserver(id) g_HasThunderCarabine[id] = false;
  73.  
  74.  
  75. public fw_player_spawn(id)
  76. {
  77. if (g_HasThunderCarabine[id])
  78. {
  79. g_HasThunderCarabine[id] = false
  80. fm_strip_user_gun(id, CSW_M4A1)
  81. }
  82. }
  83.  
  84. public zp_user_infected_post(infected, infector)
  85. {
  86. if (g_HasThunderCarabine[infected])
  87. {
  88. Color(infected, "^x04[ZP]^x01 Золотой M4A1 выключен")
  89. g_HasThunderCarabine[infected] = false;
  90. }
  91. }
  92.  
  93. public fw_player_killed(victim, attacker, shouldgib)
  94. {
  95. if(g_HasThunderCarabine[victim])
  96. {
  97. Color(victim, "^x04[ZP]^x01 Золотой M4A1 выключен")
  98. g_HasThunderCarabine[victim] = false
  99. }
  100. }
  101.  
  102. public event_CurWeapon(id)
  103. {
  104. new weapid = read_data(2)
  105.  
  106. if(!is_user_alive(id))
  107. return;
  108.  
  109. if(!g_HasThunderCarabine[id])
  110. return;
  111.  
  112. if(g_HasThunderCarabine[id] && weapid == CSW_M4A1)
  113. {
  114. entity_set_string(id, EV_SZ_viewmodel, v_thunder)
  115. entity_set_string(id, EV_SZ_weaponmodel, p_thunder)
  116. }
  117. }
  118.  
  119. public zp_extra_item_selected(player, itemid)
  120. {
  121. if (itemid == g_thunder)
  122. {
  123. if(get_pcvar_num(cvar_round_started) == 1)
  124. {
  125. if (!zp_has_round_started())
  126. {
  127. Color(player, "^x04[ZP]^x01 Вы сможете это купить после начала раунда.")
  128. zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + g_thunder_cost)
  129.  
  130. return;
  131. }
  132. }
  133. if(g_HasThunderCarabine[player])
  134. {
  135. Color(player, "^04[ZP]^x01 У вас есть Золотая м-ка")
  136. zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + g_thunder_cost)
  137. return;
  138. }
  139. else
  140. {
  141. g_HasThunderCarabine[player] = true
  142. strip_user_weapons(player)
  143. give_item(player, "weapon_m4a1")
  144. Color(player, "^x04[ZP]^x01 Вы приобрели Золотую м-ку!!")
  145. }
  146. }
  147. }
  148.  
  149. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  150. {
  151. new weapid = read_data(2)
  152.  
  153. if (!is_user_connected(attacker))
  154. return;
  155.  
  156. if(!zp_get_user_zombie(victim))
  157. return;
  158.  
  159. if (g_HasThunderCarabine[attacker] && weapid == CSW_M4A1)
  160. {
  161. SetHamParamFloat(4, damage * get_pcvar_float(cvar_carbine_damage))
  162. }
  163.  
  164. if(g_HasThunderCarabine[victim])
  165. {
  166. Color(victim, "^x04[ZP]^x01 Золотой M4A1 выключен")
  167. g_HasThunderCarabine[victim] = false
  168. }
  169. }
  170.  
  171. public clcmd_drop(player)
  172. {
  173. if (g_HasThunderCarabine[player])
  174. return PLUGIN_HANDLED;
  175.  
  176. return PLUGIN_CONTINUE;
  177. }
  178.  
  179. public fw_PlayerKilled(victim, attacker, shouldgib)
  180. {
  181. /*if(g_HasThunderCarabine[attacker])
  182. return;
  183.  
  184. if(is_user_alive(attacker))
  185. return;*/
  186.  
  187. if(!zp_get_user_zombie(victim))
  188. return;
  189.  
  190. if(!is_valid_player(attacker))
  191. return;
  192.  
  193. static killername[33], victimname[33]
  194. get_user_name(attacker, killername, 31)
  195. get_user_name(victim, victimname, 31)
  196. g_HasThunderCarabine[victim] = false;
  197. g_HasThunderCarabine[attacker]++;
  198.  
  199. new clip, ammo, wpnid = get_user_weapon(attacker, clip, ammo)
  200.  
  201. if(g_HasThunderCarabine[attacker] && wpnid == CSW_M4A1)
  202. {
  203. new vorigin[3],srco[3];
  204. get_user_origin(victim, vorigin);
  205. vorigin[2] -= 26
  206. srco[0] = vorigin[0] + 150
  207. srco[1] = vorigin[1] + 150
  208. srco[2] = vorigin[2] + 800
  209.  
  210. set_user_rendering(victim, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 16);
  211.  
  212. ThunderCarabine(srco,vorigin);
  213. ThunderCarabine(srco,vorigin);
  214. ThunderCarabine(srco,vorigin);
  215.  
  216. if(get_pcvar_num(cvar_say) == 1)
  217. {
  218. Color(attacker, "^x04[ZP]^x01 Вы убрали ^x04%s", victimname)
  219. Color(victim, "^x04[ZP]^x01 Вы устранены %s", killername)
  220. }
  221.  
  222. if(get_pcvar_num(cvar_sounds) == 1)
  223. {
  224. emit_sound(victim ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
  225. emit_sound(attacker ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
  226. }
  227. if(get_pcvar_num(cvar_logs) == 1)
  228. {
  229. // Save Hummiliation
  230. new namea[24],namev[24],authida[20],authidv[20],teama[8],teamv[8]
  231.  
  232. // Info On Attacker
  233. get_user_name(attacker,namea,23)
  234. get_user_team(attacker,teama,7)
  235. get_user_authid(attacker,authida,19)
  236. new attackerid = get_user_userid(attacker)
  237.  
  238. // Info On Victim
  239. get_user_name(victim,namev,23)
  240. get_user_team(victim,teamv,7)
  241. get_user_authid(victim,authidv,19)
  242. new victimid = get_user_userid(victim)
  243.  
  244. // Log This Kill
  245. log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"Золотой M4A1^"", namea, attackerid, authida, teama, namev, victimid, authidv, teamv)
  246. }
  247.  
  248. if(g_HasThunderCarabine[victim])
  249. {
  250. Color(victim, "^x04[ZP]^x01 Золотой M4A1 выключен")
  251. g_HasThunderCarabine[victim] = false
  252. }
  253. }
  254. }
  255.  
  256. ThunderCarabine(vec1[3],vec2[3])
  257. {
  258. message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
  259. write_byte(0);
  260. write_coord(vec1[0]);
  261. write_coord(vec1[1]);
  262. write_coord(vec1[2]);
  263. write_coord(vec2[0]);
  264. write_coord(vec2[1]);
  265. write_coord(vec2[2]);
  266. write_short(Thunder);
  267. write_byte(1);
  268. write_byte(5);
  269. write_byte(2);
  270. write_byte(20);
  271. write_byte(30);
  272. write_byte(200);
  273. write_byte(200);
  274. write_byte(200);
  275. write_byte(200);
  276. write_byte(200);
  277. message_end();
  278.  
  279. message_begin( MSG_PVS, SVC_TEMPENTITY,vec2);
  280. write_byte(9);
  281. write_coord(vec2[0]);
  282. write_coord(vec2[1]);
  283. write_coord(vec2[2]);
  284. message_end();
  285.  
  286. }
  287.  
  288.  
  289. /****************************************************
  290. Stocks Ands Others
  291. ****************************************************/
  292. stock Color(const id, const input[], any:...)
  293. {
  294. new count = 1, players[32]
  295. static msg[191]
  296. vformat(msg, 190, input, 3)
  297.  
  298. replace_all(msg, 190, "^x04", "^4") // Green Color
  299. replace_all(msg, 190, "^x01", "^1") // Default Color
  300. replace_all(msg, 190, "!team", "^3") // Team Color
  301. replace_all(msg, 190, "!team2", "^0") // Team2 Color
  302.  
  303. if (id) players[0] = id; else get_players(players, count, "ch")
  304. {
  305. for (new i = 0; i < count; i++)
  306. {
  307. if (is_user_connected(players[i]))
  308. {
  309. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  310. write_byte(players[i]);
  311. write_string(msg);
  312. message_end();
  313. }
  314. }
  315. }
  316. }
  317.  
  318. stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "")
  319. {
  320. new ent_class[32];
  321. if (!wid && wname[0])
  322. copy(ent_class, sizeof ent_class - 1, wname);
  323. else
  324. {
  325. new weapon = wid, clip, ammo;
  326. if (!weapon && !(weapon = get_user_weapon(index, clip, ammo)))
  327. return false;
  328.  
  329. get_weaponname(weapon, ent_class, sizeof ent_class - 1);
  330. }
  331.  
  332. new ent_weap = fm_find_ent_by_owner(-1, ent_class, index);
  333. if (!ent_weap)
  334. return false;
  335.  
  336. engclient_cmd(index, "drop", ent_class);
  337.  
  338. new ent_box = pev(ent_weap, pev_owner);
  339. if (!ent_box || ent_box == index)
  340. return false;
  341.  
  342. dllfunc(DLLFunc_Think, ent_box);
  343.  
  344. return true;
  345. }
  346. // Stock: fm_find_ent_by_owner (taked from fakemeta_util)
  347. stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0)
  348. {
  349. new strtype[11] = "classname", ent = index;
  350. switch (jghgtype)
  351. {
  352. case 1: strtype = "target";
  353. case 2: strtype = "targetname";
  354. }
  355.  
  356. while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {}
  357.  
  358. return ent;
  359. }
  360. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  361. *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
  362. */
  363.  

_________________
<<eb@>>Team Website - Közösség
17Buddies - Általam készített pályák.
GameBanana - Általam készített pályák/vágott hangok.

Kép
Kép


Hozzászólás jelentése
Vissza a tetejére
   
 Hozzászólás témája: Re: [ZP] Extra : Golden M4A1 (Orosz)
HozzászólásElküldve: 2013.08.27. 04:42 
Offline
Őskövület
Avatar

Csatlakozott: 2011.12.28. 00:35
Hozzászólások: 2736
Megköszönt másnak: 56 alkalommal
Megköszönték neki: 275 alkalommal
Remélem még hasznát veszed:
SMA Forráskód: [ Mindet kijelol ]
  1. /*************************************************************************************
  2.   [ZP] Thunder Carabine by Lucas_7_94 For Allied Mods .
  3.   ***************************************************************************************/
  4.  
  5.  
  6. #include <amxmodx>
  7. #include <amxmisc>
  8. #include <zombieplague>
  9. #include <fun>
  10. #include <hamsandwich>
  11. #include <engine>
  12. #include <fakemeta>
  13.  
  14. #define NAME "[ZP] Extra Item : Gold M4A1"
  15. #define VERSION "v1.5"
  16. #define CREATOR "lucas_7_94 and Van"
  17.  
  18. // Put Your Model =D
  19. new const v_thunder[] = "models/zombie_plague/v_g_m4a1.mdl"
  20. new const p_thunder[] = "models/zombie_plague/p_g_m4a1.mdl"
  21.  
  22. // Put The Cost For The Plugin
  23. new const g_thunder_cost = 60
  24.  
  25. /*==========Customization==========*/
  26. new bool: g_HasThunderCarabine[33]
  27. new Thunder, g_thunder, g_maxplayers
  28. new cvar_carbine_damage
  29. new cvar_say, cvar_sounds
  30. new cvar_round_started, cvar_logs
  31. /*===== End Customization ======*/
  32.  
  33. #define is_valid_player(%1) (1 <= %1 <= g_maxplayers) // Thanks You meTaLicross's gauss. =D
  34.  
  35. public plugin_init()
  36. {
  37. register_plugin(NAME, VERSION, CREATOR)
  38. register_cvar("Thunder Carabine", VERSION, (FCVAR_SERVER | FCVAR_SPONLY))
  39. register_clcmd("drop", "clcmd_drop")
  40.  
  41. // Events And Others
  42. register_event("CurWeapon", "event_CurWeapon", "be", "1=1")
  43.  
  44. RegisterHam(Ham_TakeDamage, "player", "fw_TakeDamage")
  45. RegisterHam(Ham_Killed, "player", "fw_PlayerKilled")
  46. RegisterHam(Ham_Spawn, "player", "fw_player_spawn", 1)
  47.  
  48. // Cvars For Item
  49. cvar_say = register_cvar("zp_thunder_says", "0")
  50. cvar_sounds = register_cvar("zp_thunder_sounds", "1")
  51. cvar_logs = register_cvar("zp_thunder_logs", "0")
  52. cvar_round_started = register_cvar("zp_thunder_buy_started", "1")
  53. cvar_carbine_damage = register_cvar("zp_thunder_damage", "5.0")
  54.  
  55. // Register the Plugin =D
  56. g_thunder = zp_register_extra_item("Arany M4A1", g_thunder_cost, ZP_TEAM_HUMAN);
  57.  
  58. // Maxplayers and the sucking Screenfade l0l D:
  59. g_maxplayers = get_maxplayers()
  60.  
  61. }
  62. public plugin_precache()
  63. {
  64. Thunder = precache_model("sprites/lgtning.spr");
  65. precache_sound( "ambience/thunder_clap.wav" )
  66. precache_model(v_thunder)
  67. precache_model(p_thunder)
  68. }
  69.  
  70. public client_disconnect(id) g_HasThunderCarabine[id] = false;
  71.  
  72. public client_putinserver(id) g_HasThunderCarabine[id] = false;
  73.  
  74.  
  75. public fw_player_spawn(id)
  76. {
  77. if (g_HasThunderCarabine[id])
  78. {
  79. g_HasThunderCarabine[id] = false
  80. fm_strip_user_gun(id, CSW_M4A1)
  81. }
  82. }
  83.  
  84. public zp_user_infected_post(infected, infector)
  85. {
  86. if (g_HasThunderCarabine[infected])
  87. {
  88. Color(infected, "^x04[ZP]^x01 Arany M4A1 fegyver kikapcsolva.")
  89. g_HasThunderCarabine[infected] = false;
  90. }
  91. }
  92.  
  93. public fw_player_killed(victim, attacker, shouldgib)
  94. {
  95. if(g_HasThunderCarabine[victim])
  96. {
  97. Color(victim, "^x04[ZP]^x01 Arany M4A1 fegyver kikapcsolva.")
  98. g_HasThunderCarabine[victim] = false
  99. }
  100. }
  101.  
  102. public event_CurWeapon(id)
  103. {
  104. new weapid = read_data(2)
  105.  
  106. if(!is_user_alive(id))
  107. return;
  108.  
  109. if(!g_HasThunderCarabine[id])
  110. return;
  111.  
  112. if(g_HasThunderCarabine[id] && weapid == CSW_M4A1)
  113. {
  114. entity_set_string(id, EV_SZ_viewmodel, v_thunder)
  115. entity_set_string(id, EV_SZ_weaponmodel, p_thunder)
  116. }
  117. }
  118.  
  119. public zp_extra_item_selected(player, itemid)
  120. {
  121. if (itemid == g_thunder)
  122. {
  123. if(get_pcvar_num(cvar_round_started) == 1)
  124. {
  125. if (!zp_has_round_started())
  126. {
  127. Color(player, "^x04[ZP]^x01 Csak kor kezdete utan tudod meg venni.")
  128. zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + g_thunder_cost)
  129.  
  130. return;
  131. }
  132. }
  133. if(g_HasThunderCarabine[player])
  134. {
  135. Color(player, "^04[ZP]^x01 Neked van egy Arany M4A1 fegyvered.")
  136. zp_set_user_ammo_packs(player, zp_get_user_ammo_packs(player) + g_thunder_cost)
  137. return;
  138. }
  139. else
  140. {
  141. g_HasThunderCarabine[player] = true
  142. strip_user_weapons(player)
  143. give_item(player, "weapon_m4a1")
  144. Color(player, "^x04[ZP]^x01 Kaptal egy Arany M4A1 fegyvert!!")
  145. }
  146. }
  147. }
  148.  
  149. public fw_TakeDamage(victim, inflictor, attacker, Float:damage, damage_type)
  150. {
  151. new weapid = read_data(2)
  152.  
  153. if (!is_user_connected(attacker))
  154. return;
  155.  
  156. if(!zp_get_user_zombie(victim))
  157. return;
  158.  
  159. if (g_HasThunderCarabine[attacker] && weapid == CSW_M4A1)
  160. {
  161. SetHamParamFloat(4, damage * get_pcvar_float(cvar_carbine_damage))
  162. }
  163.  
  164. if(g_HasThunderCarabine[victim])
  165. {
  166. Color(victim, "^x04[ZP]^x01 Arany M4A1 fegyver kikapcsolva.")
  167. g_HasThunderCarabine[victim] = false
  168. }
  169. }
  170.  
  171. public clcmd_drop(player)
  172. {
  173. if (g_HasThunderCarabine[player])
  174. return PLUGIN_HANDLED;
  175.  
  176. return PLUGIN_CONTINUE;
  177. }
  178.  
  179. public fw_PlayerKilled(victim, attacker, shouldgib)
  180. {
  181. /*if(g_HasThunderCarabine[attacker])
  182.   return;
  183.  
  184.   if(is_user_alive(attacker))
  185.   return;*/
  186.  
  187. if(!zp_get_user_zombie(victim))
  188. return;
  189.  
  190. if(!is_valid_player(attacker))
  191. return;
  192.  
  193. static killername[33], victimname[33]
  194. get_user_name(attacker, killername, 31)
  195. get_user_name(victim, victimname, 31)
  196. g_HasThunderCarabine[victim] = false;
  197. g_HasThunderCarabine[attacker]++;
  198.  
  199. new clip, ammo, wpnid = get_user_weapon(attacker, clip, ammo)
  200.  
  201. if(g_HasThunderCarabine[attacker] && wpnid == CSW_M4A1)
  202. {
  203. new vorigin[3],srco[3];
  204. get_user_origin(victim, vorigin);
  205. vorigin[2] -= 26
  206. srco[0] = vorigin[0] + 150
  207. srco[1] = vorigin[1] + 150
  208. srco[2] = vorigin[2] + 800
  209.  
  210. set_user_rendering(victim, kRenderFxGlowShell, 255, 255, 255, kRenderNormal, 16);
  211.  
  212. ThunderCarabine(srco,vorigin);
  213. ThunderCarabine(srco,vorigin);
  214. ThunderCarabine(srco,vorigin);
  215.  
  216. if(get_pcvar_num(cvar_say) == 1)
  217. {
  218. Color(attacker, "^x04[ZP]^x01 Megolted: ^x04%s", victimname)
  219. Color(victim, "^x04[ZP]^x01 megolt: %s", killername)
  220. }
  221.  
  222. if(get_pcvar_num(cvar_sounds) == 1)
  223. {
  224. emit_sound(victim ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
  225. emit_sound(attacker ,CHAN_ITEM, "ambience/thunder_clap.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
  226. }
  227. if(get_pcvar_num(cvar_logs) == 1)
  228. {
  229. // Save Hummiliation
  230. new namea[24],namev[24],authida[20],authidv[20],teama[8],teamv[8]
  231.  
  232. // Info On Attacker
  233. get_user_name(attacker,namea,23)
  234. get_user_team(attacker,teama,7)
  235. get_user_authid(attacker,authida,19)
  236. new attackerid = get_user_userid(attacker)
  237.  
  238. // Info On Victim
  239. get_user_name(victim,namev,23)
  240. get_user_team(victim,teamv,7)
  241. get_user_authid(victim,authidv,19)
  242. new victimid = get_user_userid(victim)
  243.  
  244. // Log This Kill
  245. log_message("^"%s<%d><%s><%s>^" killed ^"%s<%d><%s><%s>^" with ^"Золотой M4A1^"", namea, attackerid, authida, teama, namev, victimid, authidv, teamv)
  246. }
  247.  
  248. if(g_HasThunderCarabine[victim])
  249. {
  250. Color(victim, "^x04[ZP]^x01 Arany M4A1 fegyver kikapcsolva.")
  251. g_HasThunderCarabine[victim] = false
  252. }
  253. }
  254. }
  255.  
  256. ThunderCarabine(vec1[3],vec2[3])
  257. {
  258. message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
  259. write_byte(0);
  260. write_coord(vec1[0]);
  261. write_coord(vec1[1]);
  262. write_coord(vec1[2]);
  263. write_coord(vec2[0]);
  264. write_coord(vec2[1]);
  265. write_coord(vec2[2]);
  266. write_short(Thunder);
  267. write_byte(1);
  268. write_byte(5);
  269. write_byte(2);
  270. write_byte(20);
  271. write_byte(30);
  272. write_byte(200);
  273. write_byte(200);
  274. write_byte(200);
  275. write_byte(200);
  276. write_byte(200);
  277. message_end();
  278.  
  279. message_begin( MSG_PVS, SVC_TEMPENTITY,vec2);
  280. write_byte(9);
  281. write_coord(vec2[0]);
  282. write_coord(vec2[1]);
  283. write_coord(vec2[2]);
  284. message_end();
  285.  
  286. }
  287.  
  288.  
  289. /****************************************************
  290.   Stocks Ands Others
  291.   ****************************************************/
  292. stock Color(const id, const input[], any:...)
  293. {
  294. new count = 1, players[32]
  295. static msg[191]
  296. vformat(msg, 190, input, 3)
  297.  
  298. replace_all(msg, 190, "^x04", "^4") // Green Color
  299. replace_all(msg, 190, "^x01", "^1") // Default Color
  300. replace_all(msg, 190, "!team", "^3") // Team Color
  301. replace_all(msg, 190, "!team2", "^0") // Team2 Color
  302.  
  303. if (id) players[0] = id; else get_players(players, count, "ch")
  304. {
  305. for (new i = 0; i < count; i++)
  306. {
  307. if (is_user_connected(players[i]))
  308. {
  309. message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
  310. write_byte(players[i]);
  311. write_string(msg);
  312. message_end();
  313. }
  314. }
  315. }
  316. }
  317.  
  318. stock bool:fm_strip_user_gun(index, wid = 0, const wname[] = "")
  319. {
  320. new ent_class[32];
  321. if (!wid && wname[0])
  322. copy(ent_class, sizeof ent_class - 1, wname);
  323. else
  324. {
  325. new weapon = wid, clip, ammo;
  326. if (!weapon && !(weapon = get_user_weapon(index, clip, ammo)))
  327. return false;
  328.  
  329. get_weaponname(weapon, ent_class, sizeof ent_class - 1);
  330. }
  331.  
  332. new ent_weap = fm_find_ent_by_owner(-1, ent_class, index);
  333. if (!ent_weap)
  334. return false;
  335.  
  336. engclient_cmd(index, "drop", ent_class);
  337.  
  338. new ent_box = pev(ent_weap, pev_owner);
  339. if (!ent_box || ent_box == index)
  340. return false;
  341.  
  342. dllfunc(DLLFunc_Think, ent_box);
  343.  
  344. return true;
  345. }
  346. // Stock: fm_find_ent_by_owner (taked from fakemeta_util)
  347. stock fm_find_ent_by_owner(index, const classname[], owner, jghgtype = 0)
  348. {
  349. new strtype[11] = "classname", ent = index;
  350. switch (jghgtype)
  351. {
  352. case 1: strtype = "target";
  353. case 2: strtype = "targetname";
  354. }
  355.  
  356. while ((ent = engfunc(EngFunc_FindEntityByString, ent, strtype, classname)) && pev(ent, pev_owner) != owner) {}
  357.  
  358. return ent;
  359. }
  360. /* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
  361.   *{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
  362.   */
  363.  

_________________
****

Ők köszönték meg pixxa112 nek ezt a hozzászólást: norbee.16 (2013.08.27. 12:39)
  Népszerűség: 2.27%


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  [ 2 hozzászólás ] 


Ki van itt

Jelenlévő fórumozók: nincs regisztrált felhasználó valamint 2 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