Raised This Month: $ Target: $400
 0% 

Respawn limit


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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:59.


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