1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86. | #include <amxmodx>
#include <fun>
#include <cstrike>
#include <csstats>
new dodane
new odjete
public plugin_init() {
register_plugin("Bug Hp", "1.0", "HubertTM");
register_clcmd("say /fix", "fix");
register_clcmd("say /napraw", "fix");
register_clcmd("say /infobug", "info");
register_clcmd("say hp", "pokaz");
dodane = 1
odjete = 1
}
public fix(id)
{
new hp = get_user_health(id);
if(!is_user_alive(id))
{
client_print(id,print_chat,"[COD:MW] Nie mozesz naprawic buga poniewaz jestes nie zywy")
return PLUGIN_HANDLED
}
switch(random_num(1, 2))
{
case 1 :
{
set_user_health(id,hp += dodane)
client_print(id,print_chat,"[COD:MW] Bug z 0 HP naprawiony!.")
}
case 2 :
{
set_user_health(id,hp -= odjete)
client_print(id,print_chat,"[COD:MW] Bug z 0 HP naprawiony!")
}
}
return PLUGIN_CONTINUE;
}
public info(id)
{
static stats[8], stats2[4], body[8]
new rank_pos = get_user_stats(id, stats, body);
new max_rank = get_statsnum();
get_user_stats2(id, stats2);
static host_name[32];
get_cvar_string("hostname", host_name, 31);
static motd[1501], len;
len = format(motd, 1500,"<body bgcolor=#000000><font color=#87cefa><pre>");
len += format(motd[len], 1500-len,"<center><h4><font color=^"blue^"> Informacje o Bugu </font></h4></center>");
len += format(motd[len], 1500-len,"<left><font color=^"white^"><B>1. </B> <font color=^"white^">Bug wystepuje co 256HP liczac od zera</color></left>^n", rank_pos, max_rank);
len += format(motd[len], 1500-len,"<left><font color=^"white^"><B>2. </B> <font color=^"white^">Bug zmienia tobie sterowanie i nie mozesz strzelac.</color></left>^n", stats[0]);
len += format(motd[len], 1500-len,"<left><font color=^"white^"><B>3. </B> <font color=^"white^">Jest to blad Cs bo wskaznik Hp jest tylko do 255</color></left>^n", stats[1]);
len += format(motd[len], 1500-len,"<left><font color=^"white^"><B>3. </B> <font color=^"white^">Aby sprawdzic ile masz HP wpisz hp wyskoczy ci na zielono w gorze ekranu napis HP</color></left>^n", stats[1]);
show_motd(id, motd, "[COD:MW] Informacje o Bugu");
return 0;
}
public pokaz(id)
{
set_hudmessage(0, 255, 0, -1.0, 0.1, 0, 6.0, 7.0)
show_hudmessage(id, "[COD:MW] Twoje HP : %d", get_user_health(id))
} |