PHP код:
case 815:
{
if(!response)
return 1;
new targetid;
if(sscanf(inputtext, "u",targetid))
return ShowPlayerDialog(playerid, 815, DIALOG_STYLE_INPUT, " ", "{CED0BD}Введите ниже ID игрока, которого желаете сделать", "Выбрать", "Закрыть");
if(!InvalidTest(playerid, targetid))
return 1;
strmid(test, GetName(targetid), 0, MAX_PLAYER_NAME, MAX_PLAYER_NAME);
SendClientMessage(playerid, -1, !"test");
return 1;
}
PHP код:
stock InvalidTest(playerid, id)
{
if(id == INVALID_PLAYER_ID)
return SendClientMessage(playerid, COLOR_GREY,"Указанный игрок не найден на сервере"), 0;
else if(playerid == id)
return SendClientMessage(playerid, COLOR_GREY,"Вы указали свой ID"), 0;
return 1;
}