Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Probleme smoke teleport
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
3048
spincs
[Freakazoid]
Status: Offline
(since 17-11-2023 03:22)
Joined: 06 Oct 2013
Posts: 2297
,
Topics: 151
Location:
Bucharest
Reputation:
853.3
Votes
: 100
Posted: 13-03-2017, 22:36:49
| Translate post to:
... (
Click for more languages
)
Nume*: Problema cu pluginul pentru grenada de teleport
Descriere problema*: Este vorba despre un server de biohazard care contine acest plugin, problema vine insa de la folosirea grenadei smoke de teleport. S-au cam invatat baietii si cand au un loc unde nu pot ajunge fac team, unul din ei arunca grenada in locul respectiv si celalalt fiind zombie il infecteaza imediat si automat il teleporteaza in locul acela plin de "victime" zombalau, la urma va dati seama ce se intampla.
Eu as dorii daca se poate sa se adauge un cvar ceva, ca in momentul in care se arunca grenada de teleport si pana la teleportarea respectivului jucator, acesta sa nu mai poata fii infectat.
Poze/Sma: Aici este sursa pluginului actual:
Click
+REP
si Multumesc anticipat !
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(online 2 weeks ago)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2724.4
Votes
: 231
Posted: 15-03-2017, 12:28:40
| Translate post to:
... (
Click for more languages
)
Nu prea am inteles eu foarte bine si sincer nici nu ma pricep eu bine la modul asta, dar din cate am vazut teleport grenade ar trebui sa fie numai pentru humans ca sa ii ajute cumva sa fuga de zombalai
Nu ar trebui sa folosesti un plugin de genul
ASTA
?
0
0
Back to top
spincs
[Freakazoid]
Status: Offline
(since 17-11-2023 03:22)
Joined: 06 Oct 2013
Posts: 2297
,
Topics: 151
Location:
Bucharest
Reputation:
853.3
Votes
: 100
Posted: 15-03-2017, 21:45:15
| Translate post to:
... (
Click for more languages
)
TwisTer wrote:
Nu prea am inteles eu foarte bine si sincer nici nu ma pricep eu bine la modul asta, dar din cate am vazut teleport grenade ar trebui sa fie numai pentru humans ca sa ii ajute cumva sa fuga de zombalai
Nu ar trebui sa folosesti un plugin de genul
ASTA
?
Este numai pentru humans, numai ca exista si pluginul de /antidote. Si asa playeri care au fost zm isi i-au antidote si apoi arunca grenada la ceilalti oameni care sunt in ascunzatoare numai ca dupa ce arunca grenada si pana il teleporteaza sunt 2 secunde de asteptare, si in alea 2 secunde il infecteaza un zm si asa el se teleporteaza zm la oameni si ii omoara
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(online 2 weeks ago)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2724.4
Votes
: 231
Posted: 17-03-2017, 10:42:58
| Translate post to:
... (
Click for more languages
)
Ai incercat pluginul de mai sus?
De obicei cand postez ceva trebuie sa incercati ce va dau.
0
0
Back to top
Sa[q]
[FCSB]
Status: Offline
(since 31-01-2018 18:34)
Joined: 24 Apr 2015
Posts: 823
,
Topics: 125
Location:
Bucuresti
Reputation:
90.6
Votes
: 10
Posted: 17-03-2017, 21:22:18
| Translate post to:
... (
Click for more languages
)
Incearca ce ti-a dat TwisTer sau daca nu e bun incearca-l pe asta(nu stiu daca e la fel, nu am verificat)
Code:
/* AMX Mod X
* Teleport Smoke Grenade
*
* (c) Copyright 2006 by VEN
*
* This file is provided as is (no warranties)
*
* DESCRIPTION
* Plugin changes the smoke grenade to teleport grenade with a bit of smoke.
* Usage: drop the grenade, you will be teleported to the spot of explosion.
* Try to crouch if the height of the spot are small for uncrouched player.
*
* CREDITS
* Dread Pirate - idea
*/
#include <amxmodx>
#include <fakemeta>
#define PLUGIN_NAME "Teleport Smoke Grenade"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"
#define SMOKE_SCALE 30
#define SMOKE_FRAMERATE 12
#define SMOKE_GROUND_OFFSET 6
// do not edit
new const g_sound_explosion[] = "weapons/sg_explode.wav"
new const g_classname_grenade[] = "grenade"
new const Float:g_sign[4][2] = {{1.0, 1.0}, {1.0, -1.0}, {-1.0, -1.0}, {-1.0, 1.0}}
new g_spriteid_steam1
new g_eventid_createsmoke
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_forward(FM_EmitSound, "forward_emitsound")
register_forward(FM_PlaybackEvent, "forward_playbackevent")
// we do not precaching, but retrieving the indexes
g_spriteid_steam1 = engfunc(EngFunc_PrecacheModel, "sprites/steam1.spr")
g_eventid_createsmoke = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
public forward_emitsound(ent, channel, const sound[]) {
if (!equal(sound, g_sound_explosion) || !is_grenade(ent))
return FMRES_IGNORED
static id, Float:origin[3]
id = pev(ent, pev_owner)
pev(ent, pev_origin, origin)
engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, g_sound_explosion, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
engfunc(EngFunc_RemoveEntity, ent)
origin[2] += SMOKE_GROUND_OFFSET
create_smoke(origin)
if (is_user_alive(id)) {
static Float:mins[3], hull
pev(id, pev_mins, mins)
origin[2] -= mins[2] + SMOKE_GROUND_OFFSET
hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
if (is_hull_vacant(origin, hull))
engfunc(EngFunc_SetOrigin, id, origin)
else { // close to a solid object, trying to find a vacant spot
static Float:vec[3]
vec[2] = origin[2]
for (new i; i < sizeof g_sign; ++i) {
vec[0] = origin[0] - mins[0] * g_sign[i][0]
vec[1] = origin[1] - mins[1] * g_sign[i][1]
if (is_hull_vacant(vec, hull)) {
engfunc(EngFunc_SetOrigin, id, vec)
break
}
}
}
}
return FMRES_SUPERCEDE
}
public forward_playbackevent(flags, invoker, eventindex) {
// we do not need a large amount of smoke
if (eventindex == g_eventid_createsmoke)
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
bool:is_grenade(ent) {
if (!pev_valid(ent))
return false
static classname[sizeof g_classname_grenade + 1]
pev(ent, pev_classname, classname, sizeof g_classname_grenade)
if (equal(classname, g_classname_grenade))
return true
return false
}
create_smoke(const Float:origin[3]) {
// engfunc because origin are float
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_SMOKE)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_short(g_spriteid_steam1)
write_byte(SMOKE_SCALE)
write_byte(SMOKE_FRAMERATE)
message_end()
}
stock bool:is_hull_vacant(const Float:origin[3], hull) {
new tr = 0
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, tr)
if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
return true
return false
}
0
0
Back to top
spincs
[Freakazoid]
Status: Offline
(since 17-11-2023 03:22)
Joined: 06 Oct 2013
Posts: 2297
,
Topics: 151
Location:
Bucharest
Reputation:
853.3
Votes
: 100
Posted: 18-03-2017, 21:06:32
| Translate post to:
... (
Click for more languages
)
Am incercat, dar nu merg.
Sunt plugine care nu includ modul biohazard.
Nu sunt plugine pentru biohazard.
0
0
Back to top
Sa[q]
[FCSB]
Status: Offline
(since 31-01-2018 18:34)
Joined: 24 Apr 2015
Posts: 823
,
Topics: 125
Location:
Bucuresti
Reputation:
90.6
Votes
: 10
Posted: 20-03-2017, 00:42:16
| Translate post to:
... (
Click for more languages
)
spincs wrote:
Am incercat, dar nu merg.
Sunt plugine care nu includ modul biohazard.
Nu sunt plugine pentru biohazard.
Nu am idee de ce nu merge.
@destroi112, nu ai nimic de zis? Cam tu esti baza aici.
0
0
Back to top
TwisTer
[GOOGLE SEARCHER]
Status: Offline
(online 2 weeks ago)
Joined: 04 May 2007
Posts: 6962
,
Topics: 147
Location:
Romania
Reputation:
2724.4
Votes
: 231
Posted: 23-03-2017, 22:45:56
| Translate post to:
... (
Click for more languages
)
Nu am testat, incearca asa :
Spoiler:
Code:
#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#define PLUGIN_NAME "[ZP] Teleport Smoke Grenade"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Roadrage+VEN"
#define SMOKE_SCALE 30
#define SMOKE_FRAMERATE 12
#define SMOKE_GROUND_OFFSET 6
// do not edit
new const g_sound_explosion[] = "weapons/sg_explode.wav"
//new const g_classname_grenade[] = "grenade"
new const Float:g_sign[4][2] = {{1.0, 1.0}, {1.0, -1.0}, {-1.0, -1.0}, {-1.0, 1.0}}
new g_spriteid_steam1
new g_eventid_createsmoke
//Plague Stuff
new const item_cost = 30
new const item_name[] = "Extra Item Teleport Smoke Grenade"
new const g_classname_grenade[] = "grenade"
new item_id
new has_teleport[33]
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_forward(FM_EmitSound, "forward_emitsound")
register_forward(FM_PlaybackEvent, "forward_playbackevent")
register_message(get_user_msgid("CurWeapon"), "message_cur_weapon")
// we do not precaching, but retrieving the indexes
g_spriteid_steam1 = engfunc(EngFunc_PrecacheModel, "sprites/steam1.spr")
g_eventid_createsmoke = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
public client_disconnect(id)
{
has_teleport[id] = 0
}
public fw_PlayerKilled(victim, attacker, shouldgib)
{
has_teleport[victim] = 0
}
public select_item(player, itemid)
{
if(itemid == item_id)
{
has_teleport[player] = 1
fm_strip_user_gun(player,9)
fm_give_item(player,"weapon_smokegrenade")
client_print(player, print_center, "You just bought a teleport nade, throw it to where you want to be teleported!")
}
}
public forward_emitsound(ent, channel, const sound[])
{
if (!equal(sound, g_sound_explosion) || !is_grenade(ent))
return FMRES_IGNORED
static id, Float:origin[3]
id = pev(ent, pev_owner)
pev(ent, pev_origin, origin)
engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, g_sound_explosion, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
engfunc(EngFunc_RemoveEntity, ent)
origin[2] += SMOKE_GROUND_OFFSET
create_smoke(origin)
if (is_user_alive(id)) {
static Float:mins[3], hull
pev(id, pev_mins, mins)
origin[2] -= mins[2] + SMOKE_GROUND_OFFSET
hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
if (is_hull_vacant(origin, hull))
engfunc(EngFunc_SetOrigin, id, origin)
else { // close to a solid object, trying to find a vacant spot
static Float:vec[3]
vec[2] = origin[2]
for (new i; i < sizeof g_sign; ++i) {
vec[0] = origin[0] - mins[0] * g_sign[i][0]
vec[1] = origin[1] - mins[1] * g_sign[i][1]
if (is_hull_vacant(vec, hull)) {
engfunc(EngFunc_SetOrigin, id, vec)
break
}
}
}
}
return FMRES_SUPERCEDE
}
public forward_playbackevent(flags, invoker, eventindex) {
// we do not need a large amount of smoke
if (eventindex == g_eventid_createsmoke)
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
bool:is_grenade(ent) {
if (!pev_valid(ent))
return false
static classname[sizeof g_classname_grenade + 1]
pev(ent, pev_classname, classname, sizeof g_classname_grenade)
if (equal(classname, g_classname_grenade))
return true
return false
}
create_smoke(const Float:origin[3]) {
// engfunc because origin are float
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_SMOKE)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_short(g_spriteid_steam1)
write_byte(SMOKE_SCALE)
write_byte(SMOKE_FRAMERATE)
message_end()
}
stock bool:is_hull_vacant(const Float:origin[3], hull) {
new tr = 0
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, tr)
if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
return true
return false
}
0
0
Back to top
destroi112
[DEV]
Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042
,
Topics: 119
Location:
---------
Reputation:
515.9
Votes
: 118
Posted: 01-04-2017, 19:28:59
| Translate post to:
... (
Click for more languages
)
2 variante 1) -> verifici daca e zombie si atunci nu il mai teleporteaza
2) daca e zombie ii dai cure(antidot)
Spoiler:
/* AMX Mod X
* Teleport Smoke Grenade
*
* (c) Copyright 2006 by VEN
*
* This file is provided as is (no warranties)
*
* DESCRIPTION
* Plugin changes the smoke grenade to teleport grenade with a bit of smoke.
* Usage: drop the grenade, you will be teleported to the spot of explosion.
* Try to crouch if the height of the spot are small for uncrouched player.
*
* CREDITS
* Dread Pirate - idea
*/
#include <amxmodx>
#include <fakemeta>
#include <biohazard>
#define PLUGIN_NAME "Teleport Smoke Grenade"
#define PLUGIN_VERSION "0.1"
#define PLUGIN_AUTHOR "VEN"
#define SMOKE_SCALE 30
#define SMOKE_FRAMERATE 12
#define SMOKE_GROUND_OFFSET 6
// do not edit
new const g_sound_explosion[] = "weapons/sg_explode.wav"
new const g_classname_grenade[] = "grenade"
new const Float:g_sign[4][2] = {{1.0, 1.0}, {1.0, -1.0}, {-1.0, -1.0}, {-1.0, 1.0}}
new g_spriteid_steam1
new g_eventid_createsmoke
public plugin_init() {
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR)
register_forward(FM_EmitSound, "forward_emitsound")
register_forward(FM_PlaybackEvent, "forward_playbackevent")
// we do not precaching, but retrieving the indexes
g_spriteid_steam1 = engfunc(EngFunc_PrecacheModel, "sprites/steam1.spr")
g_eventid_createsmoke = engfunc(EngFunc_PrecacheEvent, 1, "events/createsmoke.sc")
}
public forward_emitsound(ent, channel, const sound[]) {
if (!equal(sound, g_sound_explosion) || !is_grenade(ent))
return FMRES_IGNORED
static id, Float:origin[3]
id = pev(ent, pev_owner)
pev(ent, pev_origin, origin)
engfunc(EngFunc_EmitSound, ent, CHAN_WEAPON, g_sound_explosion, VOL_NORM, ATTN_NORM, 0, PITCH_NORM)
engfunc(EngFunc_SetOrigin, ent, Float:{8191.0, 8191.0, 8191.0})
origin[2] += SMOKE_GROUND_OFFSET
create_smoke(origin)
if (is_user_alive(id) && !is_user_zombie(id)) {
//sau daca e zombie cure him
if(is_user_zombie(id)) cure_user(id);
static Float:mins[3], hull
pev(id, pev_mins, mins)
origin[2] -= mins[2] + SMOKE_GROUND_OFFSET
hull = pev(id, pev_flags) & FL_DUCKING ? HULL_HEAD : HULL_HUMAN
if (is_hull_vacant(origin, hull))
engfunc(EngFunc_SetOrigin, id, origin)
else { // close to a solid object, trying to find a vacant spot
static Float:vec[3]
vec[2] = origin[2]
for (new i; i < sizeof g_sign; ++i) {
vec[0] = origin[0] - mins[0] * g_sign[i][0]
vec[1] = origin[1] - mins[1] * g_sign[i][1]
if (is_hull_vacant(vec, hull)) {
engfunc(EngFunc_SetOrigin, id, vec)
break
}
}
}
}
return FMRES_SUPERCEDE
}
public forward_playbackevent(flags, invoker, eventindex) {
// we do not need a large amount of smoke
if (eventindex == g_eventid_createsmoke)
return FMRES_SUPERCEDE
return FMRES_IGNORED
}
bool:is_grenade(ent) {
if (!pev_valid(ent))
return false
static classname[sizeof g_classname_grenade + 1]
pev(ent, pev_classname, classname, sizeof g_classname_grenade)
if (equal(classname, g_classname_grenade))
return true
return false
}
create_smoke(const Float:origin[3]) {
// engfunc because origin are float
engfunc(EngFunc_MessageBegin, MSG_PVS, SVC_TEMPENTITY, origin, 0)
write_byte(TE_SMOKE)
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_short(g_spriteid_steam1)
write_byte(SMOKE_SCALE)
write_byte(SMOKE_FRAMERATE)
message_end()
}
stock bool:is_hull_vacant(const Float:origin[3], hull) {
new tr = 0
engfunc(EngFunc_TraceHull, origin, origin, 0, hull, 0, tr)
if (!get_tr2(tr, TR_StartSolid) && !get_tr2(tr, TR_AllSolid) && get_tr2(tr, TR_InOpen))
return true
return false
}
Retired from Amxmodx
2
0
Back to top
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 29-11-2024, 06:47:24
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details