Fix some typos and possible bugs.

This commit is contained in:
Arkshine 2014-07-20 17:31:43 +02:00
parent da63bcb24b
commit 0347571ee9
3 changed files with 4 additions and 4 deletions

View File

@ -1257,7 +1257,7 @@ public cmdLeave(id, level, cid)
new nick[MAX_NAME_LENGTH], ires, pnum = MaxClients, count = 0, lReason[128]
for (new b = 1; b < pnum; ++b)
for (new b = 1; b <= pnum; ++b)
{
if (!is_user_connected(b) && !is_user_connecting(b)) continue

View File

@ -834,7 +834,7 @@ public client_disconnect(id) {
else if ( NumOfLeaders == 1 )
client_cmd( LeaderID,"spk misc/takenlead" )
else if ( NumOfLeaders > 1 )
for ( new i=1; i<MaxClients; i++ )
for ( new i=1; i<=MaxClients; i++ )
if ( PScore[i] == LeaderScore )
client_cmd( i,"spk misc/tiedlead")
//else no players on server or have 0 score

View File

@ -248,7 +248,7 @@ public cmdReadyRoom(id,level,cid) {
else {
new cur=0;
new i=1;
while (i<MaxClients) {
while (i<=MaxClients) {
if (is_user_connected(i)) {
if (UTIL_IsSpectator(i) == 1 || g_Team[i] != 0) {
cur++;
@ -279,7 +279,7 @@ public rrStep(index) {
if (is_user_connected(index) && g_Team[index]!=0) {
client_cmd(index, "%s", g_ReadyRoomAck)
}
if (++index > MaxClients) {
if (++index >= MaxClients) {
return PLUGIN_HANDLED_MAIN
}
}