Skip to content

Commit 3d138ee

Browse files
committed
bump to 1.0
added new plugin teleport spot core: new native dr_get_next_terrorist()
1 parent bd52286 commit 3d138ee

10 files changed

+83
-11
lines changed

deathrun_buttons_control.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <hamsandwich>
66

77
#define PLUGIN "Deathrun: Buttons Control"
8-
#define VERSION "0.1f"
8+
#define VERSION "1.0"
99
#define AUTHOR "Mistrick"
1010

1111
#pragma semicolon 1

deathrun_core.sma

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#endif
1212

1313
#define PLUGIN "Deathrun: Core"
14-
#define VERSION "0.8"
14+
#define VERSION "1.0"
1515
#define AUTHOR "Mistrick"
1616

1717
#pragma semicolon 1
@@ -131,6 +131,7 @@ public plugin_natives()
131131
{
132132
register_native("dr_get_terrorist", "native_get_terrorist", 1);
133133
register_native("dr_set_next_terrorist", "native_set_next_terrorist", 1);
134+
register_native("dr_get_next_terrorist", "native_get_next_terrorist", 1);
134135
}
135136
public native_get_terrorist()
136137
{
@@ -140,6 +141,10 @@ public native_set_next_terrorist(id)
140141
{
141142
g_iNextTerrorist = id;
142143
}
144+
public native_get_next_terrorist()
145+
{
146+
return g_iNextTerrorist;
147+
}
143148
public client_putinserver(id)
144149
{
145150
if(!g_bWarmUp && _get_alive_players())
@@ -369,8 +374,7 @@ stock _get_players(players[32], bool:alive = false)
369374
new CsTeams:team, count;
370375
for(new i = 1; i <= g_iMaxPlayers; i++)
371376
{
372-
if(i == g_iTerrorist) continue;
373-
if(!is_user_connected(i) || is_user_bot(i) || is_user_hltv(i) || alive && !is_user_alive(i)) continue;
377+
if(i == g_iTerrorist || !is_user_connected(i) || alive && !is_user_alive(i)) continue;
374378
team = cs_get_user_team(i);
375379
if(team == CS_TEAM_UNASSIGNED || team == CS_TEAM_SPECTATOR) continue;
376380
players[count++] = i;

deathrun_informer.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#endif
1010

1111
#define PLUGIN "Deathrun: Informer"
12-
#define VERSION "0.8.3"
12+
#define VERSION "1.0"
1313
#define AUTHOR "Mistrick"
1414

1515
#pragma semicolon 1

deathrun_lifes.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#endif
88

99
#define PLUGIN "Deathrun: Lifes"
10-
#define VERSION "0.3.1"
10+
#define VERSION "1.0"
1111
#define AUTHOR "Mistrick"
1212

1313
#pragma semicolon 1

deathrun_mode_duel.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#endif
1313

1414
#define PLUGIN "Deathrun Mode: Duel"
15-
#define VERSION "0.10.5"
15+
#define VERSION "1.0"
1616
#define AUTHOR "Mistrick"
1717

1818
#pragma semicolon 1

deathrun_mode_free.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <deathrun_modes>
55

66
#define PLUGIN "Deathrun Mode: Free"
7-
#define VERSION "0.1.1"
7+
#define VERSION "1.0"
88
#define AUTHOR "Mistrick"
99

1010
#pragma semicolon 1

deathrun_mode_invis.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma semicolon 1
88

99
#define PLUGIN "Deathrun Mode: Invis"
10-
#define VERSION "0.2.1"
10+
#define VERSION "1.0"
1111
#define AUTHOR "Mistrick"
1212

1313
#define TERRORIST_HEALTH 150

deathrun_mode_snow.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <deathrun_modes>
99

1010
#define PLUGIN "Deathrun Mode: Snow"
11-
#define VERSION "0.4.1"
11+
#define VERSION "1.0"
1212
#define AUTHOR "Mistrick"
1313

1414
#pragma semicolon 1

deathrun_modes.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#endif
1111

1212
#define PLUGIN "Deathrun: Modes"
13-
#define VERSION "0.10.1"
13+
#define VERSION "1.0"
1414
#define AUTHOR "Mistrick"
1515

1616
#pragma semicolon 1

deathrun_teleport_spot.sma

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
#include <amxmodx>
2+
#include <engine>
3+
#include <fakemeta>
4+
#include <hamsandwich>
5+
6+
#define PLUGIN "Deathrun: Teleport Spot"
7+
#define VERSION "1.0"
8+
#define AUTHOR "Mistrick"
9+
10+
#pragma semicolon 1
11+
12+
#define RETURN_DAMAGE_TO_ATTACKER
13+
#define TP_CHECK_DISTANCE 64.0
14+
15+
#define fm_get_user_team(%0) get_pdata_int(%0, 114)
16+
17+
new player_solid[33];
18+
19+
public plugin_init()
20+
{
21+
register_plugin(PLUGIN, VERSION, AUTHOR);
22+
23+
new ent = find_ent_by_class(-1, "info_teleport_destination");
24+
25+
if(!pev_valid(ent))
26+
{
27+
log_amx("Map doesn't have any teleports.");
28+
pause("a"); return;
29+
}
30+
31+
RegisterHam(Ham_TakeDamage, "player", "Ham_PlayerTakeDamage_Pre", false);
32+
}
33+
public Ham_PlayerTakeDamage_Pre(victim, idinflictor, attacker, Float:damage, damagebits)
34+
{
35+
if(victim != attacker && fm_get_user_team(victim) != fm_get_user_team(attacker))
36+
{
37+
new Float:origin[3]; pev(victim, pev_origin, origin);
38+
new ent = -1;
39+
while((ent = find_ent_in_sphere(ent, origin, TP_CHECK_DISTANCE)))
40+
{
41+
new class_name[32]; pev(ent, pev_classname, class_name, charsmax(class_name));
42+
if(equal(class_name, "info_teleport_destination"))
43+
{
44+
#if defined RETURN_DAMAGE_TO_ATTACKER
45+
ExecuteHamB(Ham_TakeDamage, attacker, 0, attacker, damage, damagebits);
46+
#endif
47+
48+
if(is_user_alive(attacker)) slap(attacker);
49+
if(is_user_alive(victim)) slap(victim);
50+
51+
return HAM_SUPERCEDE;
52+
}
53+
}
54+
}
55+
return HAM_IGNORED;
56+
}
57+
slap(id)
58+
{
59+
player_solid[id] = pev(id, pev_solid);
60+
set_pev(id, pev_solid, SOLID_NOT);
61+
user_slap(id, 0);
62+
user_slap(id, 0);
63+
set_task(0.3, "restore_solid", id);
64+
}
65+
public restore_solid(id)
66+
{
67+
if(is_user_alive(id)) set_pev(id, pev_solid, player_solid[id]);
68+
}

0 commit comments

Comments
 (0)