Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonteohr committed Sep 6, 2017
1 parent 775a9e5 commit f857153
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 11 additions & 1 deletion addons/sourcemod/scripting/BetterWarden/Add-Ons/models.sp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ public void OnMapStart() {
}

public void OnWardenCreated(int client) { // When warden is created, set the models!
if(IsValidClient(client) && g_WardenModel.IntValue == 1) {
if(g_WardenModel.IntValue == 1) {
GetEntPropString(client, Prop_Data, "m_ModelName", previousModel, sizeof(previousModel)); // Get the "standard" model that CTs use
GetEntPropString(client, Prop_Send, "m_szArmsModel", prevArms, sizeof(prevArms));

SetEntityModel(client, "models/player/custom_player/kuristaja/jailbreak/guard1/guard1.mdl"); // Set the warden .mdl model file
SetEntPropString(client, Prop_Send, "m_szArmsModel", "models/player/custom_player/kuristaja/jailbreak/guard1/guard1_arms.mdl"); // Sets the warden arms model
}
}

public void OnWardenCreatedByAdmin(int admin, int client) {
if(g_WardenModel.IntValue == 1) {
GetEntPropString(client, Prop_Data, "m_ModelName", previousModel, sizeof(previousModel)); // Get the "standard" model that CTs use
GetEntPropString(client, Prop_Send, "m_szArmsModel", prevArms, sizeof(prevArms));

Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/BetterWarden/commands.sp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public Action Command_SetWarden(int client, int args) {
CReplyToCommand(client, "%s {red}%t", prefix, "Not Admin");
return Plugin_Handled;
}
if(!IsValidClient(client, false, true)) {
if(!IsValidClient(client)) {
CReplyToCommand(client, "%s %t", prefix, "Invalid Client");
return Plugin_Handled;
}
Expand Down
2 changes: 1 addition & 1 deletion addons/sourcemod/scripting/betterwarden.sp
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public int Native_GetTeamAliveClientCount(Handle plugin, int numParams) {
int count = 0;

for(int client = 1; client <= MaxClients; client++) {
if(!IsValidClient(client, false, false))
if(!IsValidClient(client))
continue;

if(GetClientTeam(client) == team)
Expand Down

0 comments on commit f857153

Please sign in to comment.