Доступ к архиву

Переход в группу "Пользователь"

300.00 ₽
Одноразовый платёж
Быстрый переход в группу "Пользователи", без надобности написания постов и ожидания.

Покупка дает возможность:
Быть полноправным участником форума
Нормальное копирование кода
Создавать темы
Скачивать файлы
Доступ к архиву Pawno-Info

/mn

Статус
В этой теме нельзя размещать новые ответы.

I name Alex

Умник
Доброго времени суток, помогите пожалуйста, я сделал в /mn пункт "Трудовая книжка", а как сделать так чтобы команда сразу прописывала твой id, а не выдавала в чат Используйте /wbook [id игрока]:
case 9: OnPlayerCommandText(playerid,"/wbook");

PHP:
if(strcmp(cmd, "/wbook", true) == 0)
	{
	    extract params -> new id_player; else
	    return SendClientMessage(playerid, 0xccccccAA, "Используйте /wbook [id игрока]");
	    if(!IsPlayerConnected(id_player)) return SendClientMessage(playerid, 0x999999AA, "Такого игрока нет");
	    if(GetPlayerDistanceToPlayer(playerid, id_player) > 3.0 || GetPlayerVirtualWorld(playerid) != GetPlayerVirtualWorld(id_player)) return SendClientMessage(playerid, 0x999999AA, "Игрок слишком далеко");
	    if(wbook_proposal[playerid] == true) return SendClientMessage(playerid, 0xffffffAA, "Используйте {ff9900}/cancel{ffffff} чтобы отозвать предыдущее предложение");
	    new string_show_employment_history[(134) + (MAX_PLAYER_NAME * 4)], name_id_player[MAX_PLAYER_NAME], name_playerid[MAX_PLAYER_NAME];

	    GetPlayerName(playerid, name_playerid, MAX_PLAYER_NAME);
	    GetPlayerName(id_player, name_id_player, MAX_PLAYER_NAME);
	    if(playerid == id_player)
	    {
	        new string_query_employment_history[265 + MAX_PLAYER_NAME];
	        format(string_show_employment_history, sizeof(string_show_employment_history), "%s просматривает свою трудовую книгу", name_playerid);
	        send_client_message_from_radius(playerid, string_show_employment_history);
	        //ProxDetector(20.0, playerid, string_show_employment_history, 0xDD90FFFF, 0xDD90FFFF, 0xDD90FFFF, 0xDD90FFFF, 0xDD90FFFF);
         	mysql_format(MySQLGo, string_query_employment_history, sizeof(string_query_employment_history), "SELECT * FROM `employment_history` WHERE `data_invite` < (NOW() - interval 15 day) AND `name_player` = '%e' AND `data_un_invite` IS NOT NULL AND `rang` IS NOT NULL AND `organization` <> 'no_organization' AND `organization_position` <> 'no_organization_position'", name_playerid);
          	mysql_function_query(MySQLGo, string_query_employment_history, true, "callback_employment_history", "ds", playerid, name_playerid);
          	string_query_employment_history[0] = EOS;
          	string_show_employment_history[0] = EOS;
	        name_id_player[0] = EOS;
	        name_playerid[0] = EOS;
	        return 0;
	    }
	    format(string_show_employment_history, sizeof(string_show_employment_history), "Вы предложили %s посмотреть Вашу трудовую книгу", name_id_player);
	    SendClientMessage(playerid, 0x3399ffAA, string_show_employment_history);
	    string_show_employment_history[0] = EOS;
	    format(string_show_employment_history, sizeof(string_show_employment_history), "%s хочет показать Вам свою трудовую книгу", name_playerid);
	    SendClientMessage(id_player, 0x3399ffAA, string_show_employment_history);
	    SendClientMessage(id_player, 0xffffffAA, "Нажмите {00cc00}Y{ffffff} для просмотра или {ff6600}N{ffffff} для отказа");
	    playerid_wbook = playerid;
	    id_player_wbook = id_player;
	    wbook_proposal[playerid] = true;
	    wbook_proposal[id_player] = true;
	    string_show_employment_history[0] = EOS;
	    name_id_player[0] = EOS;
	    name_playerid[0] = EOS;
	    return 1;
	}
 
Статус
В этой теме нельзя размещать новые ответы.
Сверху Снизу