Question

Видео-образец

Спойлер

CMD:calling(playerid, params[])
{
    if(GetPVarInt(playerid, "logged") == 0) return 1;
	if(!(player_info[playerid][MEMBER] || player_info[playerid][WORK]))
	return Send(playerid, COLOR_DARKORANGE, "Вы нигде не работаете | не состоите в организациях");
	if(player_info[playerid][MEMBER] == 3)
	{
		new fmt_msg[400], fmt_msg1[10+3+MAX_PLAYER_NAME+40], status[40];

		for(new i = 0; i < 15; i++)
		{
			switch(calling_pps[i][Status])
			{
				case 0: status = "";
				case 1: status = "";
				case 2: status = "";
			}
			format(fmt_msg1, sizeof fmt_msg1, "{FFFFFF}%d. %s\n", i+1, calling_pps[i][Names]);
			strcat(fmt_msg, fmt_msg1);
		}
		ShowPlayerDialog
		(
			playerid, DIALOG_CALLING_PPS, DIALOG_STYLE_LIST,
			"{66cc00}Поступившие вызовы:",
			fmt_msg,
			"Выбрать", "Закрыть"
		);
	}
	return 1;
}

 

Спойлер

case DIALOG_CALLING_PPS:
		{
			if(response)
			{
				for(new pps = 0; pps < 15; pps++)
				{
				    dialo_listitem[playerid] = listitem;

					new down = GetPlayerID(calling_pps[dialo_listitem[playerid]][Names]);

			 		new Float:pos[3];
					GetPlayerPos(down, pos[0], pos[1], pos[2]);
					SetPlayerRaceCheckpoint(playerid, 1, pos[0], pos[1], pos[2], 0.0, 0.0, 0.0, 5.0, RCP_ACTION_TYPE_FIND_PLAYER);

					static const fmt_msg[] = "Вы приняли вызов в полицию от %s[%d].";
					new string[sizeof(fmt_msg)+(-2+128)];
					format(string, sizeof(string), fmt_msg, calling_pps[dialo_listitem[playerid]][Names], down);
					Send(playerid, COLOR_BLUE, string);

					format(string, sizeof(string), "Офицер %s[%d] принял Ваш вызов.", player_info[playerid][NAME], playerid);
					Send(down, COLOR_BLUE, string);
					break;
				}
			}
		}

 

 

Share this post


Link to post

1 answer to this question

  • 1

В чём ошибка ?

Share this post


Link to post
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By def
      arizona.pwn(23374) : error 012: invalid function call, not a valid address
      arizona.pwn(23374) : error 001: expected token: ";", but found ")"
      arizona.pwn(23374) : error 029: invalid expression, assumed zero
      arizona.pwn(23374) : fatal error 107: too many error messages on one line
      жалуется на данную строчку:
       
      %s{cccccc}Для продолжения нажмите 'Далее'",PN(playerid),playerid,ItemsInfo[itemid][ItemName2],hours,cost*hours,Inventory[playerid][2][slot], AksColorName(Inventory[playerid][4][slot]), Inventory[playerid][5][slot] ? GetNameStripe(Inventory[playerid][5][slot]) : "");