Raised This Month: $12 Target: $400
 3% 

Auto Revive


Post New Thread Reply   
 
Thread Tools Display Modes
enjoi.
Veteran Member
Join Date: Mar 2011
Old 04-28-2012 , 11:34   Re: Auto Revive
Reply With Quote #11

Yes, FODDER. You're correct. When I kills someone he will auto revive in the place he died at.. And the round won't end it will stay alive so I do amx_botadd ENJOIbot which plugin name is Potti. then I teleports him to the spot I wants and its a 1v1, in normal mode when you kill him the round will restart and he will be dead. I want it so he will spawn the spot, and get killed then he will Automatic Revive in the spot he died if POSSIBLE and the round wont restart. So tl;dr

Potti plugin I use then I do amx_botadd enjoibot Then I will do amx_teleportmenu spawn him in the spot I want shoot the spam spot and the round won't restart and my bot will automatic revive without having to restart the round and if possible he will spawn in the place He died. Please help
__________________
Block Maker v6.0 []
Point Slay v3.0 []
Contact [ PM ]
enjoi. is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-28-2012 , 14:01   Re: Auto Revive
Reply With Quote #12

You've to install Infinite Round and use that :

Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new g_iOrigin[ 33 ][ 3 ]; public plugin_init( ) {     RegisterHam( Ham_Killed, "player", "hamKilledPre" );     RegisterHam( Ham_Killed, "player", "hamKilledPost", 1 ); } public hamKilledPre( id ) {     pev( id, pev_origin, g_iOrigin[ id ] ); } public hamKilledPost( id ) {     ExecuteHamB( Ham_CS_RoundRespawn, id );     set_pev( id, pev_origin, g_iOrigin[ id ] ); }
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 04-30-2012 at 07:15.
Devil259 is offline
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 04-29-2012 , 15:13   Re: Auto Revive
Reply With Quote #13

Quote:
Originally Posted by Devil259 View Post
You've to install Infinite Round and use that :

Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new g_iOrigin[ 33 ][ 3 ]; public plugin_init( ) {     RegisterHam( Ham_Killed, "player", "hamKilledPre" );     RegisterHam( Ham_Killed, "player", "hamKilledPost" ); } public hamKilledPre( id ) {     pev( id, pev_origin, g_iOrigin[ id ] ); } public hamKilledPost( id ) {     ExecuteHamB( Ham_CS_RoundRespawn, id );     set_pev( id, pev_origin, g_iOrigin[ id ] ); }
How do I install Orpheu me and him want the same thing hahaha. Will he spawn where he died?
FODDER is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-29-2012 , 17:31   Re: Auto Revive
Reply With Quote #14

Quote:
Originally Posted by FODDER View Post
How do I install Orpheu
http://forums.alliedmods.net/showthread.php?t=116393

Quote:
Originally Posted by FODDER View Post
Will he spawn where he died?
Yes.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Old 04-29-2012, 21:27
FODDER
This message has been deleted by FODDER.
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 04-29-2012 , 21:38   Re: Auto Revive
Reply With Quote #15

Infinite Round crashes my server. I found a non-stop round plugin. Your plugin doesn't revive the bot. My revive plugin is amx_revive name 100 0

has to be 100 0
Thx someone please do this!

bot im using: http://forums.alliedmods.net/showthread.php?p=255078

revive: http://forums.alliedmods.net/showthread.php?t=13987

Last edited by FODDER; 04-29-2012 at 21:43.
FODDER is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 04-30-2012 , 07:16   Re: Auto Revive
Reply With Quote #16

If you use bots, this should works :

Code:
#include < amxmodx > #include < fakemeta > #include < hamsandwich > new g_iOrigin[ 33 ][ 3 ]; new bool:gRegistered; public plugin_init( ) {     RegisterHam( Ham_Killed, "player", "hamKilledPre" );     RegisterHam( Ham_Killed, "player", "hamKilledPost", 1 ); } public client_putinserver( id ) {     if( is_user_bot( id ) && !gRegistered )     {         gRegistered = true;         RegisterHamFromEntity( Ham_Killed, id, "hamKilledPre" );         RegisterHamFromEntity( Ham_Killed, id, "hamKilledPost", 1 );     } } public hamKilledPre( id ) {     pev( id, pev_origin, g_iOrigin[ id ] ); } public hamKilledPost( id ) {     ExecuteHamB( Ham_CS_RoundRespawn, id );     set_pev( id, pev_origin, g_iOrigin[ id ] ); }
__________________
You can do anything you set your mind to, man.


Last edited by Devil259; 04-30-2012 at 16:11.
Devil259 is offline
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 04-30-2012 , 07:37   Re: Auto Revive
Reply With Quote #17

help guys I'm noob it doesnt work. Bot no revives. Wouldn't it be


PHP Code:
#include < amxmodx >
#include < fakemeta >
#include < hamsandwich >

new g_iOrigin33 ][ ];

new 
bool:gRegistered;

public 
plugin_init( )
{
    
RegisterHamHam_Killed"bot""hamKilledPre" );
    
RegisterHamHam_Killed"bot""hamKilledPost" );
}

public 
client_putinserverid )
{
    if( 
is_user_botid ) && !gRegistered )
    {
        
gRegistered true;
        
RegisterHamFromEntityHam_Killedid"hamKilledPre" );
        
RegisterHamFromEntityHam_Killedid"hamKilledPost");
    }
}

public 
hamKilledPreid )
{
    
pevidpev_origing_iOriginid ] );
}

public 
hamKilledPostid )
{
    
ExecuteHamBHam_CS_RoundRespawnid );
    
set_pevidpev_origing_iOriginid ] );

?

Last edited by FODDER; 04-30-2012 at 07:38.
FODDER is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-30-2012 , 11:20   Re: Auto Revive
Reply With Quote #18

PHP Code:
    RegisterHamHam_Killed"bot""hamKilledPre" );
    
RegisterHamHam_Killed"bot""hamKilledPost" ); 
Why did you change that? Keep it as "player" class. Also, it should be a post hook for killed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 04-30-2012 at 11:21.
Exolent[jNr] is offline
FODDER
Member
Join Date: Mar 2012
Location: Florida, United States
Old 04-30-2012 , 15:09   Re: Auto Revive
Reply With Quote #19

Quote:
Originally Posted by Exolent[jNr] View Post
PHP Code:
    RegisterHamHam_Killed"bot""hamKilledPre" );
    
RegisterHamHam_Killed"bot""hamKilledPost" ); 
Why did you change that? Keep it as "player" class. Also, it should be a post hook for killed.
do you think you can do that? i never coded b4 in my life so i no nothing about this thats why i did bot im not sure i am a noob in coding lol
FODDER is offline
iBrazilian
Senior Member
Join Date: May 2011
Old 04-30-2012 , 15:45   Re: Auto Revive
Reply With Quote #20

Here is a peace of code I use for my server, I'm sure you can get working. There are a few things added in there but just simple delete. It's also a bit outdated, Ham is much better but I haven't had much time or motivation to change it.

PHP Code:
#include <amxmisc>
#include <fun>
#include <amxmodx>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <engine>

#define CVAR "amx_noweapdrop_ondeath"

// no drop
#define WBOX "models/w_weaponbox.mdl"
#define BOMB "models/w_backpack.mdl"
#define SHLD "models/w_shield.mdl"
#define MAX_PLAYERS 32
new g_entid[MAX_PLAYERS 1]
new 
g_maxents
// no drop end

new cvar_respawndelay

public plugin_init()
    {
    
register_plugin("Player""Respawn""iBrazilian")
    
register_event("DeathMsg""event_deathmsg""a")
    
cvar_respawndelay register_cvar("amx_respawndelay""5.0"// Delay before respawning
    
RegisterHam(Ham_Spawn"player""WeaponMenu"1
    
    
set_msg_blockget_user_msgid"ClCorpse" ), BLOCK_SET );
    
    
//no drop
    
register_forward(FM_SetModel"forward_set_model")
    
register_cvar(CVAR"1")
    
g_maxents get_global_int(GL_maxEntities)
    
// no drop
}

public 
event_deathmsg()
    {
    
set_task(get_pcvar_float(cvar_respawndelay), "respawn_player"read_data(2))
}

public 
respawn_player(id)
    {
    if (!
is_user_connected(id) || is_user_alive(id) || cs_get_user_team(id) == CS_TEAM_SPECTATOR)
        return;
    
    
set_pev(idpev_deadflagDEAD_RESPAWNABLE)
    
dllfunc(DLLFunc_Thinkid)
    
    if (
is_user_bot(id) && pev(idpev_deadflag) == DEAD_RESPAWNABLE)
        {
        
dllfunc(DLLFunc_Spawnid)
    }
}

public 
WeaponMenu(id)
    {
    new 
menu menu_create("\rGun menu""gun_handler");
    
    
menu_additem(menu"\wM4a1""1"0);
    
menu_additem(menu"\wAk47""2"0);
    
menu_additem(menu"\wAwp""3"0);
    
menu_additem(menu"\wAutoshotgun""4"0);
    
menu_additem(menu"\w12Gauge""5"0);
    
menu_additem(menu"\wP90""6"0);
    
menu_additem(menu"\wBullpup""7"0);
    
    
menu_setprop(menuMPROP_EXITMEXIT_ALL);
    
    
menu_display(idmenu0);
}
public 
gun_handler(idmenuitem)
    {
    if( 
item == MENU_EXIT )
        {
        
menu_destroy(menu);
        return 
PLUGIN_HANDLED;
    }
    
    new 
data[6], szName[64];
    new 
accesscallback;
    
menu_item_getinfo(menuitemaccessdata,charsmax(data), szName,charsmax(szName), callback);
    
    
    new 
key str_to_num(data);
    
    switch(
key)
    {
        case 
1:
        {
            
fm_give_item(id,"weapon_m4a1")        
            
fm_give_item(id,"ammo_556nato")
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
            
menu_destroy(menu);
            return 
PLUGIN_HANDLED;
        }
        case 
2:
        {
            
fm_give_item(id,"weapon_ak47")        
            
fm_give_item(id,"ammo_762nato")
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
        case 
3
        {
            
fm_give_item(id,"weapon_awp")
            
fm_give_item(id,"ammo_338magnum")
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
        case 
4
        {
            
fm_give_item(id,"weapon_xm1014")    
            
fm_give_item(id,"ammo_buckshot")            
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
        case 
5
        {
            
fm_give_item(id,"weapon_m3")        
            
fm_give_item(id,"ammo_buckshot")
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
        case 
6
        {
            
fm_give_item(id,"weapon_p90")    
            
fm_give_item(id,"ammo_57mm")            
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
        case 
7
        {
            
fm_give_item(id,"weapon_aug")    
            
fm_give_item(id,"ammo_556nato")            
            
fm_give_item(id,"weapon_flashbang")
            
fm_give_item(id,"weapon_smokegrenade")
            
fm_give_item(id,"weapon_hegrenade")
        }
    }
    
    
menu_destroy(menu);
    return 
PLUGIN_HANDLED;
}

public 
forward_set_model(entidmodel[]) {
    if (!
is_valid_ent(entid) || !equal(modelWBOX9) || !get_cvar_num(CVAR))
        return 
FMRES_IGNORED
    
    
new id entity_get_edict(entidEV_ENT_owner)
    if (!
id || !is_user_connected(id) || is_user_alive(id))
        return 
FMRES_IGNORED
    
    
if (equal(modelSHLD)) {
        
kill_entity(entid)
        return 
FMRES_IGNORED
    
}
    
    if (
equal(modelWBOX)) {
        
g_entid[id] = entid
        
return FMRES_IGNORED
    
}
    
    if (
entid != g_entid[id])
        return 
FMRES_IGNORED
    
    g_entid
[id] = 0
    
    
if (equal(modelBOMB))
        return 
FMRES_IGNORED
    
    
for (new 1<= g_maxents; ++i) {
        if (
is_valid_ent(i) && entid == entity_get_edict(iEV_ENT_owner)) {
            
kill_entity(entid)
            
kill_entity(i)
        }
    }
    
    return 
FMRES_IGNORED
}

stock kill_entity(id) {
    
entity_set_int(idEV_INT_flagsentity_get_int(idEV_INT_flags)|FL_KILLME)
}

 
//   RegisterHam( Ham_Spawn, "player", "player_spawn", 1 ) 
    
//public player_spawn( id ) {
//    if( is_user_alive( id ) )
///    {
  //      set_user_health( id, 120 );
  //  }
//} 
__________________
Pokemod Season 5 [ |||||||||| Complete]
iBrazilian is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode