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

zspawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-02-2009 , 18:05   zspawn
Reply With Quote #1

Code:
 
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
#tryinclude <biohazard>
new PLUG[] = "Zombie Respawn";
new VERS[] = "1.0";
new AUTH[] = "LeviN & Stewie!";
public plugin_init()
{
    register_plugin(PLUG, VERS, AUTH);
   
    register_clcmd("say !zspawn", "Spawn");
    register_clcmd("say_team !zspawn", "Spawn");
    register_clcmd("say_team /zspawn", "Spawn");
    register_clcmd("say /zspawn", "Spawn");
}
public Spawn(id)
{
    if(!is_user_alive(id))
    {
        cs_set_user_team(id, CS_TEAM_T);
        set_task(0.1, "spawn_again", id);
    }
    return PLUGIN_HANDLED;
}
public spawn_again(id)
{
    ExecuteHamB(Ham_Spawn, id);
    set_task(0.1, "make_zombie", id);
}
public make_zombie(id)
{
    infect_user(id);
}
It won't set them as a zombie but would revive a human. I need it to turn them into a zombie.
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-02-2009 , 18:11   Re: zspawn
Reply With Quote #2

Test it without the biohazard portion of the plugin.
Also, you don't need a delay between team change and spawning.

Code:
#include <amxmodx>
#include <hamsandwich>
#include <cstrike>
new PLUG[] = "Zombie Respawn";
new VERS[] = "1.0";
new AUTH[] = "LeviN & Stewie!";
public plugin_init()
{
    register_plugin(PLUG, VERS, AUTH);
   
    register_clcmd("say !zspawn", "Spawn");
    register_clcmd("say_team !zspawn", "Spawn");
    register_clcmd("say_team /zspawn", "Spawn");
    register_clcmd("say /zspawn", "Spawn");
}
public Spawn(id)
{
    if(!is_user_alive(id))
    {
        cs_set_user_team(id, CS_TEAM_T);
        ExecuteHamB(Ham_Spawn, id);
    }
    return PLUGIN_HANDLED;
}
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-02-2009 , 18:15   Re: zspawn
Reply With Quote #3

That works fine, but the problem is it doesn't infect the user which the command is "infect_user", I need that to work
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 03-02-2009 , 18:39   Re: zspawn
Reply With Quote #4

Then that is a problem with the biohazard portion. Post in the plugin's topic for support.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
MeRcyLeZZ
Veteran Member
Join Date: Dec 2007
Old 03-07-2009 , 16:42   Re: zspawn
Reply With Quote #5

Shouldn't you be using ExecuteHamB(Ham_CSRoundRespawn) for players?
That way Biohazard should detect the spawn correctly, then you can turn the player into zombie or whatever...
__________________
MeRcyLeZZ is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-07-2009 , 16:52   Re: zspawn
Reply With Quote #6

yah, I solved the problem Thanks anywayz
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 03-07-2009 , 16:59   Re: zspawn
Reply With Quote #7

How did you solve it?
BOYSplayCS is offline
DruGzOG
Veteran Member
Join Date: Nov 2007
Location: Unknown
Old 03-07-2009 , 17:33   Re: zspawn
Reply With Quote #8

the same way mercylezz explains it
__________________
DruGzOG is offline
Send a message via AIM to DruGzOG
elec1shock
Member
Join Date: Jul 2008
Old 03-28-2010 , 08:28   Re: zspawn
Reply With Quote #9

can u post complete script so we can compile it 2???
elec1shock is offline
pizzavesel
Member
Join Date: Dec 2008
Location: Romania
Old 03-28-2010 , 09:53   Re: zspawn
Reply With Quote #10

And can you make a automatic respawn script for this version for biohazard.
pizzavesel is offline
Send a message via Yahoo to pizzavesel Send a message via Skype™ to pizzavesel
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 02:15.


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