Skip to content

Commit

Permalink
fixed some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Franc1sco committed Jan 9, 2016
1 parent abc04e9 commit 58fe953
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Binary file modified franug_autorespawn.smx
Binary file not shown.
9 changes: 7 additions & 2 deletions franug_autorespawn.sp
Expand Up @@ -2,7 +2,7 @@
#include <sdktools>
#include <cstrike>

#define DATA "1.3"
#define DATA "1.3.1"

#define RESPAWNT 0.5 // time for respawn

Expand Down Expand Up @@ -36,6 +36,11 @@ public OnPluginStart()
HookEvent("player_death", Event_PlayerDeath, EventHookMode_Post);
}

public OnMapStart()
{
enable = true;
}

public Action:spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
new client = GetClientOfUserId(GetEventInt(event, "userid"));
Expand All @@ -57,7 +62,7 @@ public Action:Resp(Handle timer, int userid)
int client = GetClientOfUserId(userid);
if(client == 0) return;

if(!IsPlayerAlive(client) && GetClientTeam(client) > 1 && enable) CS_RespawnPlayer(client)
if(IsClientInGame(client) && !IsPlayerAlive(client) && GetClientTeam(client) > 1 && enable) CS_RespawnPlayer(client)
}

public Action:OnJoinTeam(client, const String:command[], numArgs)
Expand Down

0 comments on commit 58fe953

Please sign in to comment.