Raised This Month: $ Target: $400
 0% 

[Help] Need Edit..


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
The Professional
Member
Join Date: Nov 2015
Location: İstanbul
Old 11-27-2015 , 14:50   [Help] Need Edit..
Reply With Quote #1

I need edit this plugin. When killed player respawn get zombie (Sorry my english too bad.)

I want compatible with ZP 4.3 or 5.0

Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>

#pragma semicolon 1

#define VERSION    "1.0"

new cvar_on, cvar_time;

new Float: Origin[33][3];

public plugin_init()
{        
    register_plugin("Respawn at place", VERSION, "Drekes");
    
    cvar_on = register_cvar("amx_respawn_on", "1");
    cvar_time = register_cvar("amx_respawn_time", "5.0");
    
    RegisterHam(Ham_Killed, "player", "Fwd_Ham_Killed_Pre", 0);
}

public Fwd_Ham_Killed_Pre(victim, attacker, shouldgib)
{
    if(get_pcvar_num(cvar_on))
    {    
        if(is_user_connected(victim))
        {
            entity_get_vector(victim, EV_VEC_origin, Origin[victim]);
            Origin[victim][2] += 20.0;
        }
        
        set_task(get_pcvar_float(cvar_time), "Respawn", victim);
    }
}

public Respawn(id)
{
    if(is_user_connected(id))
    {
        ExecuteHamB(Ham_CS_RoundRespawn, id);
        
        entity_set_origin(id, Origin[id]);
    }
}
The Professional is offline
felipemilralze
Senior Member
Join Date: Jul 2011
Location: Brazil
Old 11-27-2015 , 18:21   Re: [Help] Need Edit..
Reply With Quote #2

PHP Code:
public Respawn(id)
{
    if(
is_user_connected(id) && zp_core_is_zombie(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
        
entity_set_origin(idOrigin[id]);
    }


Last edited by felipemilralze; 11-27-2015 at 18:22.
felipemilralze is offline
Send a message via MSN to felipemilralze Send a message via Skype™ to felipemilralze
The Professional
Member
Join Date: Nov 2015
Location: İstanbul
Old 11-27-2015 , 19:00   Re: [Help] Need Edit..
Reply With Quote #3

Quote:
Originally Posted by felipemilralze View Post
PHP Code:
public Respawn(id)
{
    if(
is_user_connected(id) && zp_core_is_zombie(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
        
entity_set_origin(idOrigin[id]);
    }

Compile Error..Please Help me
The Professional is offline
The Professional
Member
Join Date: Nov 2015
Location: İstanbul
Old 11-27-2015 , 19:29   Re: [Help] Need Edit..
Reply With Quote #4

Quote:
Originally Posted by felipemilralze View Post
PHP Code:
public Respawn(id)
{
    if(
is_user_connected(id) && zp_core_is_zombie(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
        
entity_set_origin(idOrigin[id]);
    }

I tested now. don't work. thanks for caring

- PLEASE HELP ME -

Last edited by The Professional; 11-27-2015 at 19:30.
The Professional is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-29-2015 , 05:51   Re: [Help] Need Edit..
Reply With Quote #5

PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <zombieplague>

#define VERSION    "1.0"

new cvar_oncvar_time;

new 
FloatOrigin[33][3];

public 
plugin_init()
{        
    
register_plugin("Respawn at place"VERSION"Drekes");
    
    
cvar_on register_cvar("amx_respawn_on""1");
    
cvar_time register_cvar("amx_respawn_time""5.0");
    
    
RegisterHam(Ham_Killed"player""Fwd_Ham_Killed_Pre"0);
}

public 
Fwd_Ham_Killed_Pre(victimattackershouldgib)
{
    if(
get_pcvar_num(cvar_on))
    {    
        if(
is_user_connected(victim))
        {
            
entity_get_vector(victimEV_VEC_originOrigin[victim]);
            
Origin[victim][2] += 20.0;
        }
        
        
set_task(get_pcvar_float(cvar_time), "Respawn"victim);
    }
}

public 
Respawn(id)
{
    if(
is_user_connected(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
        
entity_set_origin(idOrigin[id]);

        
zp_infect_user(id);
    }


Last edited by Chihuahuax; 11-29-2015 at 06:00. Reason: loose indentation fix lol
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
The Professional
Member
Join Date: Nov 2015
Location: İstanbul
Old 11-29-2015 , 13:54   Re: [Help] Need Edit..
Reply With Quote #6

Quote:
Originally Posted by Chihuahuax View Post
PHP Code:
#include <amxmodx>
#include <hamsandwich>
#include <engine>
#include <zombieplague>

#define VERSION    "1.0"

new cvar_oncvar_time;

new 
FloatOrigin[33][3];

public 
plugin_init()
{        
    
register_plugin("Respawn at place"VERSION"Drekes");
    
    
cvar_on register_cvar("amx_respawn_on""1");
    
cvar_time register_cvar("amx_respawn_time""5.0");
    
    
RegisterHam(Ham_Killed"player""Fwd_Ham_Killed_Pre"0);
}

public 
Fwd_Ham_Killed_Pre(victimattackershouldgib)
{
    if(
get_pcvar_num(cvar_on))
    {    
        if(
is_user_connected(victim))
        {
            
entity_get_vector(victimEV_VEC_originOrigin[victim]);
            
Origin[victim][2] += 20.0;
        }
        
        
set_task(get_pcvar_float(cvar_time), "Respawn"victim);
    }
}

public 
Respawn(id)
{
    if(
is_user_connected(id))
    {
        
ExecuteHamB(Ham_CS_RoundRespawnid);
        
        
entity_set_origin(idOrigin[id]);

        
zp_infect_user(id);
    }

It is worked. Thanks for help
The Professional is offline
The Professional
Member
Join Date: Nov 2015
Location: İstanbul
Old 11-29-2015 , 16:13   Re: [Help] Need Edit..
Reply With Quote #7

And Have bug.. Please plugin get to active until the end of round
The Professional is offline
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-29-2015 , 18:03   Re: [Help] Need Edit..
Reply With Quote #8

Quote:
Originally Posted by The Professional View Post
And Have bug.. Please plugin get to active until the end of round
what bug? I dont get you
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Chihuahuax
Senior Member
Join Date: Oct 2014
Location: Malaysia
Old 11-30-2015 , 06:30   Re: [Help] Need Edit..
Reply With Quote #10

remove:
PHP Code:
entity_set_origin(idOrigin[id]) 
Chihuahuax is offline
Send a message via Skype™ to Chihuahuax
Reply



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 19:14.


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