Quote:
Originally Posted by bandit
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.0, TMR_RespawnPlayer, victim);
PrintHintText(victim, "Respawning in 5 seconds ! Be ready !");
}
}
public Action:TMR_RespawnPlayer(Handle:tmr, any:client)
{
if(!IsClientInGame(client))
return Plugin_Handled;
CS_RespawnPlayer(client);
DeathCount[client]++;
return Plugin_Continue;
}
__________________