Skip to content

Commit

Permalink
Change hint text to give player ready/captain info together.
Browse files Browse the repository at this point in the history
  • Loading branch information
splewis committed May 31, 2014
1 parent 16cb58a commit 617012a
Showing 1 changed file with 28 additions and 15 deletions.
43 changes: 28 additions & 15 deletions csgo/addons/sourcemod/scripting/pugsetup.sp
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,7 @@ public Action:Timer_CheckReady(Handle:timer) {
CreateTimer(1.0, StartPicking);
return Plugin_Stop;
} else {
decl String:cap1[60];
decl String:cap2[60];
if (IsValidClient(g_capt1) && !IsFakeClient(g_capt1) && IsClientInGame(g_capt1))
Format(cap1, sizeof(cap1), "%N", g_capt1);
else
Format(cap1, sizeof(cap1), "not selected");

if (IsValidClient(g_capt2) && !IsFakeClient(g_capt2) && IsClientInGame(g_capt2))
Format(cap2, sizeof(cap2), "%N", g_capt2);
else
Format(cap2, sizeof(cap2), "not selected");

PrintHintTextToAll("Captain 1: %s\nCaptain 2: %s",cap1, cap2);

StatusHint(rdy, count);
}
} else {
ReadyToStart();
Expand All @@ -222,12 +209,38 @@ public Action:Timer_CheckReady(Handle:timer) {
}

} else {
PrintHintTextToAll("%i out of %i players are ready\nType .ready to ready up", rdy, count);
StatusHint(rdy, count);
}

return Plugin_Continue;
}

public StatusHint(numReady, numTotal) {
if (!g_mapSet) {
PrintHintTextToAll("%i out of %i players are ready\nType .ready to ready up", numReady, numTotal);
} else {
if (g_TeamType == TeamType_Captains) {
decl String:cap1[60];
decl String:cap2[60];
if (IsValidClient(g_capt1) && !IsFakeClient(g_capt1) && IsClientInGame(g_capt1))
Format(cap1, sizeof(cap1), "%N", g_capt1);
else
Format(cap1, sizeof(cap1), "not selected");

if (IsValidClient(g_capt2) && !IsFakeClient(g_capt2) && IsClientInGame(g_capt2))
Format(cap2, sizeof(cap2), "%N", g_capt2);
else
Format(cap2, sizeof(cap2), "not selected");

PrintHintTextToAll("%i out of %i players are ready\nCaptain 1: %s\nCaptain 2: %s", numReady, numTotal, cap1, cap2);

} else {
PrintHintTextToAll("%i out of %i players are ready\nType .ready to ready up", numReady, numTotal);
}

}
}



/***********************
Expand Down

0 comments on commit 617012a

Please sign in to comment.