Skip to content
This repository was archived by the owner on Oct 30, 2019. It is now read-only.

Commit 73eb5b0

Browse files
CleversonCleverson
authored andcommitted
Fixed small things
Removed unused variable iMoney on fnMoneyTeam and passed directly into string
1 parent 810c927 commit 73eb5b0

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

addons/amxmodx/scripting/PugCS.sma

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -575,39 +575,42 @@ public fnMoneyTeam(id)
575575
new sTeam[13];
576576
get_user_team(id,sTeam,charsmax(sTeam));
577577

578-
new iPlayers[32],iNum,iPlayer;
578+
new iPlayers[MAX_PLAYERS],iNum,iPlayer;
579579
get_players(iPlayers,iNum,"aeh",sTeam);
580580

581-
new sName[32],sHud[512],iMoney;
581+
new sName[MAX_NAME_LENGTH],sList[512];
582582

583583
for(new i;i < iNum;i++)
584584
{
585585
iPlayer = iPlayers[i];
586-
587-
iMoney = cs_get_user_money(iPlayer);
586+
588587
get_user_name(iPlayer,sName,charsmax(sName));
589588

590589
format
591590
(
592-
sHud,
593-
charsmax(sHud),
591+
sList,
592+
charsmax(sList),
594593
"%s%s $ %i^n",
595-
sHud,
594+
sList,
596595
sName,
597-
iMoney
596+
cs_get_user_money(iPlayer)
598597
);
599598
}
600599

601600
set_hudmessage(0,255,0,0.58,0.02,0,0.0,10.0,0.0,0.0,1);
602601
show_hudmessage(id,(sTeam[0] == 'T') ? "Terrorists" : "Counter-Terrorists");
603602

604603
set_hudmessage(255,255,225,0.58,0.05,0,0.0,10.0,0.0,0.0,2);
605-
show_hudmessage(id,sHud);
604+
show_hudmessage(id,sList);
606605
}
607606

608607
public CS_OnBuy(id,iWeapon)
609608
{
610-
if((iWeapon == CSI_FLASHBANG) || (iWeapon == CSI_HEGRENADE) || (iWeapon == CSI_SMOKEGRENADE))
609+
if(iWeapon == CSI_SHIELD)
610+
{
611+
return get_pcvar_num(g_pBlockShield) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
612+
}
613+
else if((iWeapon == CSI_FLASHBANG) || (iWeapon == CSI_HEGRENADE) || (iWeapon == CSI_SMOKEGRENADE))
611614
{
612615
new iStage = GET_PUG_STAGE();
613616

@@ -616,10 +619,6 @@ public CS_OnBuy(id,iWeapon)
616619
return get_pcvar_num(g_pBlockGrenades) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
617620
}
618621
}
619-
else if(iWeapon == CSI_SHIELD)
620-
{
621-
return get_pcvar_num(g_pBlockShield) ? PLUGIN_HANDLED : PLUGIN_CONTINUE;
622-
}
623622

624623
return PLUGIN_CONTINUE;
625624
}

addons/amxmodx/scripting/PugReady.sma

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public fnReadyTimeOut(id)
371371
{
372372
new iReadyTime = get_pcvar_num(g_pAutoReadyTime);
373373

374-
new sTime[32];
374+
new sTime[MAX_STRING_LENGTH];
375375
get_time_length
376376
(
377377
id,

0 commit comments

Comments
 (0)