Raised This Month: $32 Target: $400
 8% 

Anti late join


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MihailoZ
Member
Join Date: Aug 2013
Old 09-21-2019 , 06:32   Anti late join
Reply With Quote #1

Hello,

I tried using this plugin https://forums.alliedmods.net/showpo...7&postcount=29

and it has a bug where after the round is ended (last player is killed) it respawns only players who were already on server (didn't join late).

Thanks.
__________________
mhvtnns
MihailoZ is offline
MihailoZ
Member
Join Date: Aug 2013
Old 09-21-2019 , 16:30   Re: Anti late join
Reply With Quote #2

Code:
/*-----------------------------------------------------------------------------------------------------------------------*/
/* Script forged in the depths of the ocean by Stewie!                                                                   */
/*---------------------------------------------------------------------------------------------------------=[ Stewie! ]=-*/
#include <amxmodx>
#include <cstrike>
#include <hamsandwich>

#pragma semicolon 1;

/* Info */
new PLUG[] = "Anti Late Spawn";
new VERS[] = "(  .  Y  .  )";
new AUTH[] = "Stewie!";

new Float:gflDelay = 5.0;
new Float:gflRoundStart;

new giSpawns[33];

/*-----------------------------------------------------------------------------------------------------------------------*/
/* plugin_init                                                                                                           */
/*---------------------------------------------------------------------------------------------------------=[ Stewie! ]=-*/
public plugin_init()
{
    register_plugin(PLUG, VERS, AUTH);
    register_cvar(PLUG, VERS, FCVAR_SERVER);
    
    /* Forwards */
    RegisterHam(Ham_Spawn, "player", "fwdPlayerSpawn", 1);
    
    /* Events */
    register_logevent("eventRoundStart", 2, "1=Round_Start");
}

/*-----------------------------------------------------------------------------------------------------------------------*/
/* Forwards                                                                                                              */
/*---------------------------------------------------------------------------------------------------------=[ Stewie! ]=-*/
public client_connect(id)
{
    giSpawns[id] = 0;
}

public fwdPlayerSpawn(id)
{
    giSpawns[id]++;
    
    if(giSpawns[id] == 2 && get_gametime() >= (gflRoundStart + gflDelay))
        user_silentkill(id)
    return HAM_IGNORED;
}

/*-----------------------------------------------------------------------------------------------------------------------*/
/* Events                                                                                                                */
/*---------------------------------------------------------------------------------------------------------=[ Stewie! ]=-*/
public eventRoundStart()
{
    gflRoundStart = get_gametime();
}
This one is working fine. It's just has a preview of death (3rd person view every time a player joins late)
__________________
mhvtnns
MihailoZ 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 04:51.


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