Lemon18
Ученик
Здраствуйте. Помогите исправить пожалуйста команду, когда на сервере 1 или 2 человека (неважно сколько) я пишу /uninvite 3(такого id нету на сервере) мне вылазит в чате Server:Unknow command
Вот команда.
Вот команда.
PHP:
else if(strcmp(cmd, "/uninvite", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 2) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 4) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 5) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 6) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 11) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 12) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 13) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 14) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 15) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 17) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 18) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 24) return true;
if(PlayerInfo[playerid][pRKInections] < 9 && PlayerInfo[playerid][pMRInections] == 26) return true;
if(PlayerInfo[playerid][pRKInections] < 14 && PlayerInfo[playerid][pMRInections] == 1) return true;
if(PlayerInfo[playerid][pRKInections] < 14 && PlayerInfo[playerid][pMRInections] == 3) return true;
if(PlayerInfo[playerid][pRKInections] < 14 && PlayerInfo[playerid][pMRInections] == 10) return true;
if(PlayerInfo[playerid][pRKInections] < 14 && PlayerInfo[playerid][pMRInections] == 19) return true;
if(PlayerInfo[playerid][pRKInections] < 5 && PlayerInfo[playerid][pMRInections] == 7) return true;
if(PlayerInfo[playerid][pRKInections] < 12 && PlayerInfo[playerid][pMRInections] == 16) return true;
if(PlayerInfo[playerid][pRKInections] < 14 && PlayerInfo[playerid][pMRInections] == 21) return true;
tmp = strcharsplit(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: /uninvite [id èãðîêà] [ïðè÷èíà]");
new para1 = ReturnUser(tmp);
if(anti[playerid] == 1 && PlayerInfo[playerid][playerAdminka] != 11) return SendClientMessage(playerid, COLOR_LIGHTRED, "[Àíòè-Íàêàçàíèå] Âû ñëîâèëè áëîê íà íàêàçàíèå ñðîêîì 15 ìèíóò.");
if(para1 == playerid) return SendClientMessage(playerid,-1,"Ñåáÿ íåâîçìîæíî óâîëèòü");
if(PlayerInfo[para1][pLRInections] >= 1) { SendClientMessage(playerid, COLOR_WHITE, "Error: Âû óêàçàëè ID ëèäåðà"); return true; }
if(PlayerInfo[para1][pMRInections] == 0) return SendClientMessage(playerid, COLOR_GREY,"Ýòîò ÷åëîâåê ãðàæäàíñêèé");
if(PlayerInfo[playerid][pLRInections] <= 0 && PlayerInfo[playerid][pRKInections] <= PlayerInfo[para1][pRKInections]) return SendClientMessage(playerid, COLOR_GREY, "Îøèáêà");
if(!IsPlayerConnected(para1) || para1 == INVALID_PLAYER_ID) return true;
if(PlayerInfo[para1][pMRInections] == PlayerInfo[playerid][pLRInections] ||PlayerInfo[para1][pMRInections] == PlayerInfo[playerid][pMRInections])
{
if(PlayerInfo[para1][pMRInections] > 0)
{
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "Ââåäèòå: /uninvite [id] [ïðè÷èíà]");
new stringers[256];
SendMes(para1, 0xFF4500FF, "%s[%d] óâîëèë Âàñ èç îðãàíèçàöèè. Ïðè÷èíà: %s", PlayerInfo[playerid][pNames], playerid, (result));
SendMes(playerid, 0xFF4500FF, "Âû óâîëèëè %s[%d] èç îðãàíèçàöèè. Ïðè÷èíà: %s", PlayerInfo[para1][pNames], para1, (result));
new ftext[100];
switch(PlayerInfo[para1][pMRInections])
{
case 1: { ftext = "Ïîëèöèÿ ËÑ(1)"; }
case 2: { ftext = "FBI(2)"; }
case 3: { ftext = "Àðìèÿ: Àâèàíîñåö(3)"; }
case 4: { ftext = "Ìèí.Çäðàâîîõðàíåíèÿ(4)"; }
case 5: { ftext = "La Cosa Nostra(5)"; }
case 6: { ftext = "Yakuza(6)"; }
case 7: { ftext = "Ìýðèÿ(7)"; }
case 10: { ftext = "Ïîëèöèÿ ÑÔ(10)"; }
case 11: { ftext = "Èíñòðóêòîðû(11)"; }
case 12: { ftext = "Ballas Gang(12)"; }
case 13: { ftext = "Vagos Gang(13)"; }
case 14: { ftext = "Russian Mafia(14)"; }
case 15: { ftext = "Grove Street Gang(15)"; }
case 16: { ftext = "ÑÌÈ(16)"; }
case 17: { ftext = "Varior Aztecas Gang(17)"; }
case 18: { ftext = "Rifa Gang(18)"; }
case 19: { ftext = "Àðìèÿ ËÂ(19)"; }
case 21: { ftext = "Ïîëèöèÿ ËÂ(21)"; }
case 23: { ftext = "Hitmans(23)"; }
case 24: { ftext = "Street Racers(24)"; }
case 25: { ftext = "S.W.A.T(25)"; }
case 26: { ftext = "Ïðàâèòåëüñòâî(26)"; }
default: { ftext = "$$$$ERROR$$$$"; }
}
format(stringers, sizeof(stringers), "[A] {FF6A6A}%s[%d] óâîëèë %s[%d] èç %s. Ïðè÷èíà: %s", PlayerInfo[playerid][pNames], playerid, PlayerInfo[para1][pNames],para1,ftext,(result));
SendAdminMessage(0x99CC00FF, stringers);//õàëâà
printf("[UNINVITE] %s óâîëèë %s ñ ïðè÷èíîé %s", PlayerInfo[playerid][pNames], PlayerInfo[para1][pNames], (result));
SetPlayerArmourAC(para1,0);
ResetPlayerWeapons(para1);
PlayerInfo[para1][pMRInections] = 0;
PlayerInfo[para1][pRKInections] = 0;
PlayerInfo[para1][pLRInections] = 0;
PlayerInfo[para1][pJob] = 0;
SetPlayerToTeamColor(para1);
SetPlayerSkin(para1, PlayerInfo[para1][pChar]);
antiwarn[playerid] += 8;
if(antiwarn[playerid] >= 30 && anti[playerid] == 0) anti[playerid] = 1, antiwarn[playerid] = 900;
}
}
else SendClientMessage(playerid, COLOR_GREY,"Ýòîò ÷åëîâåê íå ñîñòîèò â âàøåé îðãàíèçàöèè");
}
return true;
}
