Raised This Month: $ Target: $400
 0% 

respawn function


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
giumbalau
Member
Join Date: Jan 2021
Old 02-02-2021 , 20:59   respawn function
Reply With Quote #1

Can anyone add the respawn function in this plugin please
Thanks

PHP Code:
    #include <amxmodx>

    #define PLUGIN "Warm up"
    #define VERSION "1.0"
    #define AUTHOR ""

    
new bool:WarmUp;
    new 
Seconds 50;

    public 
plugin_init() 
    {
        
register_plugin(PLUGINVERSIONAUTHOR);
        
register_event("CurWeapon""Current_Weapon""be""1=1""2!29");
        
WarmUp true;
        
set_task(120.0"RemoveWarmUp"123);
        
set_task(1.0"ShowCountDown"1234,_,_,"b",_);
    }
    public 
Current_Weapon(id)
    {
        if(
WarmUp)
            
engclient_cmd(id"weapon_knife");
    }
    public 
ShowCountDown()
    {

        
set_hudmessage 25255250.010.1500.01.00.10.1, -1;
        
show_hudmessage(0"Warmup round : %d seconds left."Seconds);
        
Seconds--;
        if(
Seconds <= 0)
        {

            if(
task_exists(1234))
                
remove_task(1234);
            
WarmUp false;
            
server_cmd("sv_restart 1");
            return;
        }
    }
    public 
RemoveWarmUp() WarmUp false
giumbalau is offline
giumbalau
Member
Join Date: Jan 2021
Old 02-03-2021 , 20:10   Re: respawn function
Reply With Quote #2

Anyone please ? :>
giumbalau is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-04-2021 , 08:10   Re: respawn function
Reply With Quote #3

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

    #define PLUGIN "Warm up"
    #define VERSION "1.0"
    #define AUTHOR ""

    new bool:WarmUp;
    new Seconds = 50;

    public plugin_init() 
    {
        register_plugin(PLUGIN, VERSION, AUTHOR);
        register_event("CurWeapon", "Current_Weapon", "be", "1=1", "2!29");
        RegisterHamPlayer(Ham_Spawn, "PlayerSpawn", true)
        WarmUp = true;
        set_task(120.0, "RemoveWarmUp", 123);
        set_task(1.0, "ShowCountDown", 1234,_,_,"b",_);
    }

    public PlayerSpawn(id)
{

        // spawned
}
    public Current_Weapon(id)
    {
        if(WarmUp)
            engclient_cmd(id, "weapon_knife");
    }
    public ShowCountDown()
    {

        set_hudmessage 25, 255, 25, 0.01, 0.15, 0, 0.0, 1.0, 0.1, 0.1, -1;
        show_hudmessage(0, "Warmup round : %d seconds left.", Seconds);
        Seconds--;
        if(Seconds <= 0)
        {

            if(task_exists(1234))
                remove_task(1234);
            WarmUp = false;
            server_cmd("sv_restart 1");
            return;
        }
    }
    public RemoveWarmUp() WarmUp = false;
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
giumbalau
Member
Join Date: Jan 2021
Old 02-04-2021 , 19:16   Re: respawn function
Reply With Quote #4

Quote:
Originally Posted by iceeedr View Post
Code:
#include <amxmodx>
#include <hamsandwich>

    #define PLUGIN "Warm up"
    #define VERSION "1.0"
    #define AUTHOR ""

    new bool:WarmUp;
    new Seconds = 50;

    public plugin_init() 
    {
        register_plugin(PLUGIN, VERSION, AUTHOR);
        register_event("CurWeapon", "Current_Weapon", "be", "1=1", "2!29");
        RegisterHamPlayer(Ham_Spawn, "PlayerSpawn", true)
        WarmUp = true;
        set_task(120.0, "RemoveWarmUp", 123);
        set_task(1.0, "ShowCountDown", 1234,_,_,"b",_);
    }

    public PlayerSpawn(id)
{

        // spawned
}
    public Current_Weapon(id)
    {
        if(WarmUp)
            engclient_cmd(id, "weapon_knife");
    }
    public ShowCountDown()
    {

        set_hudmessage 25, 255, 25, 0.01, 0.15, 0, 0.0, 1.0, 0.1, 0.1, -1;
        show_hudmessage(0, "Warmup round : %d seconds left.", Seconds);
        Seconds--;
        if(Seconds <= 0)
        {

            if(task_exists(1234))
                remove_task(1234);
            WarmUp = false;
            server_cmd("sv_restart 1");
            return;
        }
    }
    public RemoveWarmUp() WarmUp = false;
Edit : error 017: undefined symbol "RegisterHamPlayer"
The warmup round not starting also...

Last edited by giumbalau; 02-04-2021 at 20:27.
giumbalau is offline
nG_getwreck
Senior Member
Join Date: Oct 2020
Location: Philippines from South K
Old 02-04-2021 , 21:26   Re: respawn function
Reply With Quote #5

This is from amxx dev 183 right? this native?

PHP Code:
Edit error 017undefined symbol "RegisterHamPlayer" 
What version of amx are you using?

Try this one instead:

Ver. 183 & above
PHP Code:
RegisterHamPlayer(Ham_Spawn"PlayerSpawn"true
--- >>

Older ver
PHP Code:
RegisterHam(Ham_Spawn"player""PlayerSpawn"true
__________________

Last edited by nG_getwreck; 02-04-2021 at 21:31.
nG_getwreck is offline
giumbalau
Member
Join Date: Jan 2021
Old 02-05-2021 , 06:24   Re: respawn function
Reply With Quote #6

Quote:
Originally Posted by nG_getwreck View Post
This is from amxx dev 183 right? this native?

PHP Code:
Edit error 017undefined symbol "RegisterHamPlayer" 
What version of amx are you using?

Try this one instead:

Ver. 183 & above
PHP Code:
RegisterHamPlayer(Ham_Spawn"PlayerSpawn"true
--- >>

Older ver
PHP Code:
RegisterHam(Ham_Spawn"player""PlayerSpawn"true
I'am using amx mod x 1.8.2 but still not working the warmup is not starting
giumbalau is offline
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 02-05-2021 , 10:17   Re: respawn function
Reply With Quote #7

Show your actual code
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
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 05:51.


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