Raised This Month: $ Target: $400
 0% 

help :)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Murz
Member
Join Date: Jan 2015
Location: Lithuania Vilnius
Old 04-30-2016 , 15:08   help :)
Reply With Quote #1

Hello, all how to resolve this problem
this plugin should respawn first killed player

Quote:
L 04/26/2016 - 17:42:22: [HAMSANDWICH] Entity has null private data (32)
L 04/26/2016 - 17:42:22: [AMXX] Displaying debug trace (plugin "pirmas_mires_respawn.amxx", version "1.1")
L 04/26/2016 - 17:42:22: [AMXX] Run time error 10: native error (native "ExecuteHamB")
L 04/26/2016 - 17:42:22: [AMXX] [0] pirmas_mires_respawn.sma::Respawn (line 45)
Code:
#include <amxmodx>
#include <cstrike> 
#include <hamsandwich>
 
new bool:gRespawn = true;
 
public plugin_init()
{
    register_plugin("Respawn After 20 Seconds", "1.1", "hleV");
 
    register_logevent("JoinedTeam", 3, "1=joined team");
 
    RegisterHam(Ham_Spawn, "player", "Spawn", 1);
    RegisterHam(Ham_Killed, "player", "Killed", 1);
   
    register_logevent("logevent_round_end", 2, "1=Round_End")  
}
 
public JoinedTeam()
{
    new Name[32];
    read_logargv(0, Name, 31);
    parse_loguser(Name, Name, 31);
    new Cl = get_user_index(Name);
 
    if (!task_exists(Cl))
        set_task(20.0, "Respawn", Cl);
}
 
public Spawn(Client)
{
    if (is_user_alive(Client))
        remove_task(Client);
}
 
public Killed(Client)
{
    if (!task_exists(Client))
        set_task(20.0, "Respawn2", Client);
}
 
public Respawn(Client)
{
    if (!is_user_alive(Client))
        ExecuteHamB(Ham_CS_RoundRespawn, Client);
}
 
public Respawn2(Client)
{
    if (!is_user_alive(Client))
    {
        if(gRespawn)
        {
            cs_user_spawn(Client);
            gRespawn = false;
        }
    }
}
 
public logevent_round_end( )
{
    gRespawn = true;
}
Murz is offline
Send a message via Skype™ to Murz
 



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 18:36.


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