Your ranking and kills code were linked together with { and } misplaced. Here is how they should look:
pawn Код:
if(strcmp(cmd,"/ranking",true)==0)
{
if(IsPlayerConnected(playerid))
{
new string[128];
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|________________ Ranking Goals ________________|");
format(string, sizeof(string), "** Rank 4 - Helicopter Usage: %s.", CCN[PlayerInfo[playerid][pHeligoal]]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "** Rank 6 - Armour Bar: %s.", CCN[PlayerInfo[playerid][pArmourgoal]]);
SendClientMessage(playerid, COLOR_GREEN, string);
format(string, sizeof(string), "** Rank 8 - /Mapvis Command: %s.", CCN[PlayerInfo[playerid][pMapgoal]]);
SendClientMessage(playerid, COLOR_GREEN, string);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|_______________________________________________|");
}
return 1;
}
pawn Код:
if(strcmp(cmd,"/kills",true)==0)
{
if(IsPlayerConnected(playerid))
{
new grkills = PlayerInfo[playerid][pGrenadekill];
new mpkills = PlayerInfo[playerid][pMp5kill];
new knkills = PlayerInfo[playerid][pKnucklekill];
new string[128];
new text1[20];
new text2[20];
new text3[20];
if(PlayerInfo[playerid][pGrenadekill] == 25) { text1 = "Complete!"; } else { text1 = "Not Complete"; }
if(PlayerInfo[playerid][pMp5kill] == 100) { text2 = "Complete!"; } else { text2 = "Not Complete"; }
if(PlayerInfo[playerid][pKnucklekill] == 15) { text3 = "Complete!"; } else { text3 = "Not Complete"; }
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|________________ Kills Goals ________________|");
format(string, sizeof(string), "** %d /25 Grenades kills: %s.",grkills, text1);
SendClientMessage(playerid, COLOR_WHITE, string);
format(string, sizeof(string), "** %d /100 MP5 kills: %s.",mpkills, text2);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "** %d /15 Knuckle Duster kills: %s.",knkills, text3);
SendClientMessage(playerid, COLOR_GOLD, string);
SendClientMessage(playerid, COLOR_LIGHTGREEN, "|______________________________________________|");
}
return 1;
}
Remember that all commands should have the same number of { as } in them, if there are more or less than there should be, problems like the one you described will occur.