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

Respawn limit


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 10:17   Respawn limit
Reply With Quote #1

Hello,

If possible I would like a script for CSGO that does the following:

Respawn Terrorists 6 times, and
Respawn Counter Terrorists 3 times
with a 5 second respawn timer for both sides

Each player can respawn 6 times (Arkarr response)

thanks in advance

bandit

Last edited by bandit; 07-18-2014 at 11:48. Reason: keep getting logged offf
bandit is offline
Send a message via MSN to bandit
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-18-2014 , 10:23   Re: Respawn limit
Reply With Quote #2

Terrorists 6 times -> each players 6 times or only 6 respawn availables for the team ?
__________________
Want to check my plugins ?
Arkarr is offline
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 12:34   Re: Respawn limit
Reply With Quote #3

Quote:
Originally Posted by Arkarr View Post
Terrorists 6 times -> each players 6 times or only 6 respawn availables for the team ?
Hi Arkarr,

Thanks for responding

I would like each player to respawn 6 times
bandit is offline
Send a message via MSN to bandit
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-18-2014 , 13:28   Re: Respawn limit
Reply With Quote #4

Here, take this :
PHP Code:
#include <sourcemod>
#include <cstrike>

#define MAX_RESPAWN_CT 3
#define MAX_RESPAWN_T 6
#define TEAM_CT 3
#define TEAM_T 2

new DeathCount[MAXPLAYERS+1];

public 
Plugin:myinfo =  
{  
    
name "More Respawn",  
    
author "Arkarr",  
    
description "Respawn players depend their team.",  
    
version "1.0",  
    
url "http://www.sourcemod.net/"  
}; 

public 
OnPluginStart()  

    
HookEvent("player_death"Event_PlayerDeath);
}

public 
OnClientConnected(client)
{
    
DeathCount[client] = 0;
}

public 
Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
victim GetClientOfUserId(GetEventInt(event"userid"));
    new 
team GetClientTeam(victim);
    if((
team == TEAM_CT && DeathCount[victim] < MAX_RESPAWN_CT) || (team == TEAM_T && DeathCount[victim] < MAX_RESPAWN_T))
    {
        
CreateTimer(5.0TMR_RespawnPlayervictim);
        
PrintHintText(victim"Respawning in 5 seconds ! Be ready !");
    }
}

new 
Handle:TMR_RespawnPlayer(Handle:tmrany:client)
{
    
CS_RespawnPlayer(client);
    
DeathCount[client]++;

Not tested but should work !
__________________
Want to check my plugins ?

Last edited by Arkarr; 07-18-2014 at 13:30.
Arkarr is offline
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 15:11   Re: Respawn limit
Reply With Quote #5

Quote:
Originally Posted by Arkarr View Post
Terrorists 6 times -> each players 6 times or only 6 respawn availables for the team ?
I am getting this error when compiling"

/home/groups/sourcemod/upload_tmp/phpSZNo98.sp(36) : error 017: undefined symbol "TMR_RespawnPlayer"
/home/groups/sourcemod/upload_tmp/phpSZNo98.sp(41) : error 001: expected token: ";", but found "("

2 Errors.
bandit is offline
Send a message via MSN to bandit
ghost09
New Member
Join Date: Jul 2014
Location: Argentina
Old 07-18-2014 , 15:33   Re: Respawn limit
Reply With Quote #6

Quote:
Originally Posted by bandit View Post
I am getting this error when compiling"

/home/groups/sourcemod/upload_tmp/phpSZNo98.sp(36) : error 017: undefined symbol "TMR_RespawnPlayer"
/home/groups/sourcemod/upload_tmp/phpSZNo98.sp(41) : error 001: expected token: ";", but found "("

2 Errors.
PHP Code:
#include <cstrike>

#define MAX_RESPAWN_CT 3
#define MAX_RESPAWN_T 6
#define TEAM_CT 3
#define TEAM_T 2

new DeathCount[MAXPLAYERS+1];

public 
Plugin:myinfo =  
{  
    
name "More Respawn",  
    
author "Arkarr",  
    
description "Respawn players depend their team.",  
    
version "1.0",  
    
url "http://www.sourcemod.net/"  
}; 

public 
OnPluginStart()  

    
HookEvent("player_death"Event_PlayerDeath);
}

public 
OnClientConnected(client)
{
    
DeathCount[client] = 0;
}

public 
Action:Event_PlayerDeath(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
victim GetClientOfUserId(GetEventInt(event"userid"));
    new 
team GetClientTeam(victim);
    if((
team == TEAM_CT && DeathCount[victim] < MAX_RESPAWN_CT) || (team == TEAM_T && DeathCount[victim] < MAX_RESPAWN_T))
    {
        
CreateTimer(5.0TMR_RespawnPlayervictim);
        
PrintHintText(victim"Respawning in 5 seconds ! Be ready !");
    }
}

public 
Action:TMR_RespawnPlayer(Handle:tmrany:client)
{
    if(!
IsClientInGame(client))
        return 
Plugin_Handled;
        
    
CS_RespawnPlayer(client);
    
DeathCount[client]++;
    return 
Plugin_Continue;

__________________

Last edited by ghost09; 07-18-2014 at 15:35.
ghost09 is offline
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 16:05   Re: Respawn limit
Reply With Quote #7

When I died I did not respawn, but I did see
"Respawning in 5 seconds ! Be ready !"

I even tried it with a bot on my team, and still could not respawn

Last edited by bandit; 07-18-2014 at 16:16.
bandit is offline
Send a message via MSN to bandit
Arkarr
Veteran Member
Join Date: Sep 2012
Location: Just behind my PC screen
Old 07-18-2014 , 16:31   Re: Respawn limit
Reply With Quote #8

remove
PHP Code:
if(!IsClientInGame(client)) 
        return 
Plugin_Handled
Not sure by the way.
__________________
Want to check my plugins ?
Arkarr is offline
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 17:56   Re: Respawn limit
Reply With Quote #9

Still didn't work
bandit is offline
Send a message via MSN to bandit
bandit
Senior Member
Join Date: Jul 2009
Old 07-18-2014 , 19:54   Re: Respawn limit
Reply With Quote #10

Quote:
Originally Posted by Arkarr View Post
remove
PHP Code:
if(!IsClientInGame(client)) 
        return 
Plugin_Handled
Not sure by the way.
I currently am using this script which works great,
but it spawns 3 player for both sides (where as I need 6 on T)
Maybe you can use this as a reference

https://forums.alliedmods.net/showth...&highlight=vip
bandit is offline
Send a message via MSN to bandit
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 11:57.


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