Maxim_Jakson
Умник
Помоги поправить эту команду...дело в том что когда я её пиши у меня всегда выдаёт в чат /hitpass [id] [твоё новое имя]
пишу ид пишу имя и всё время пищет это же сообщение
Вот команда
пишу ид пишу имя и всё время пищет это же сообщение
Вот команда
PHP:
if(strcmp(cmd, "/passhit", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Подсказка: /hitpass [ID/Имя] [Твое имя новое и фамилия]");
return 1;
}
new Float:plocx,Float:plocy,Float:plocz;
new plo;
plo = ReturnUser(tmp);
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))
{
SendClientMessage(playerid, COLOR_GRAD2, "Подсказка: /hitpass [ID/Имя] [Твое имя новое и фамилия]");
return 1;
}
tmp = strtok(cmdtext, idx);
if (IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
GetPlayerPos(plo,plocx,plocy,plocz);
if(PlayerInfo[playerid][pMember] == 8)
{
if(!IsPlayerInRangeOfPoint(playerid,10.0,plocx,plocy,plocz))
{
SendClientMessage(playerid, COLOR_GREY, "Ты слишком далеко от этого игрока");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(plo, giveplayer, sizeof(giveplayer));
new text1[20];
new text2;
new text3[20];
new text4[20];
if(PlayerInfo[playerid][pSexhit] == 1)
{
text1 = "Мужской";
}
else if(PlayerInfo[playerid][pSexhit] == 2)
{
text1 = "Женский";
}
text2 = PlayerInfo[playerid][pAge];
if(PlayerInfo[playerid][pMemberhit] == 1)
{
text3 = "SAPD";
}
else if(PlayerInfo[playerid][pMemberhit] == 2)
{
text3 = "F.B.I.";
}
else if(PlayerInfo[playerid][pMemberhit] == 3)
{
text3 = "Nac. Guard";
}
else if(PlayerInfo[playerid][pMemberhit] == 4)
{
text3 = "МЧС";
}
else if(PlayerInfo[playerid][pMemberhit] == 7)
{
text3 = "Гос. Дума";
}
else if(PlayerInfo[playerid][pMemberhit] == 9)
{
text3 = "S.A.N.";
}
else if(PlayerInfo[plo][pMemberhit] == 10)
{
text3 = "Компания такси";
}
else if(PlayerInfo[playerid][pMemberhit] == 11)
{
text3 = "Авто-школа";
}
else if(PlayerInfo[playerid][pJobhit] == 1) { text3 = "Инкасатор"; }
else if(PlayerInfo[playerid][pJobhit] == 2) { text3 = "Адвокат"; }
else if(PlayerInfo[playerid][pJobhit] == 3) { text3 = "Проститутка"; }
else if(PlayerInfo[playerid][pJobhit] == 4) { text3 = "Драгдиллер"; }
else if(PlayerInfo[playerid][pJobhit] == 5) { text3 = "Автоугонщик"; }
else if(PlayerInfo[playerid][pJobhit] == 6) { text3 = "Репортер"; }
else if(PlayerInfo[playerid][pJobhit] == 7) { text3 = "Автомеханик"; }
else if(PlayerInfo[playerid][pJobhit] == 8) { text3 = "Охранник"; }
else if(PlayerInfo[playerid][pJobhit] == 9) { text3 = "Торговец оружием"; }
else if(PlayerInfo[playerid][pJobhit] == 10) { text3 = "ааааааа"; }
else if(PlayerInfo[playerid][pJobhit] == 12) { text3 = "Боксер"; }
else if(PlayerInfo[playerid][pJobhit] == 14) { text3 = "Водитель"; }
else if(PlayerInfo[playerid][pJobhit] == 15) { text3 = "Доставщик газет"; }
else if(PlayerInfo[playerid][pJobhit] == 16) { text3 = "Дальнобойщик"; }
else if(PlayerInfo[playerid][pJobhit] == 22) { text3 = "Развозчик пиццы"; }
else if(PlayerInfo[playerid][pJobhit] == 23) { text3 = "Взломщик"; }
else if(PlayerInfo[playerid][pJobhit] == 24) { text3 = "Страховой Агент"; }
else if(PlayerInfo[playerid][pJobhit] == 25) { text3 = "Чистильщик улиц"; }
else if(PlayerInfo[playerid][pJobhit] == 26) { text3 = "Мусорщик"; }
else
{
text3 = "Отсутствует";
}
if(PlayerInfo[playerid][pOriginhit] >= 1 && PlayerInfo[playerid][pOriginhit] <= 3)
{
text4 = "LS";
}
if(PlayerInfo[playerid][pOriginhit] >= 4 && PlayerInfo[playerid][pOriginhit] <= 6)
{
text4 = "SF";
}
if(PlayerInfo[playerid][pOriginhit] == 7)
{
text4 = "LV";
}
GetInitials(playerid);
format(string, sizeof(string), "|========== Паспорт ==========|");
SendClientMessage(plo, COLOR_WHITE, string);
format(string, sizeof(string), "** Имя Фамилия: %s", strlen(result));
SendClientMessage(plo, COLOR_GREY, string);
//format(string, sizeof(string), "** Фамилия: %s", family);
//SendClientMessage(plo, COLOR_GREY, string);
format(string, sizeof(string), "** Пол: %s", text1);
SendClientMessage(plo, COLOR_GREY, string);
format(string, sizeof(string), "** Возраст: %d", text2);
SendClientMessage(plo, COLOR_GREY, string);
format(string, sizeof(string), "** Место работы: %s", text3);
SendClientMessage(plo, COLOR_GREY, string);
format(string, sizeof(string), "** Место прописки: %s", text4);
SendClientMessage(plo, COLOR_GREY, string);
SendClientMessage(plo, COLOR_GREY, "|========= ________ =========|");
SendClientMessage(playerid, COLOR_GREY, "Ты показал игроку фальшивый паспорт");
format(string, sizeof(string), "* %s достаёт свой паспорт и показывает его %s", sendername,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
}
}
else
{
format(string, sizeof(string), "* %i оффлайн игрок.", plo);
SendClientMessage(playerid, COLOR_GRAD1, string);
}
}
return 1;
}
