Get number from string
#1

Код:
CMD:wdcs(playerid)
{
	new pDialog[999];
	new PlayerName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,PlayerName,MAX_PLAYER_NAME);
	strcat(pDialog, "ID/名称\t命令\n", sizeof(pDialog));
	for(new i = 1; i < MAX_TELEPORT; i++)
	{
		if(!strcmp(TeleportData[i][Owner], PlayerName, false) && !isnull(TeleportData[i][Owner]))
		{
		new string[60];
		format(string, sizeof(string), "[ID%d]%s\t%s\n",TeleportData[i][ID],TeleportData[i][Name],TeleportData[i][CMD]);
		strcat(pDialog, string, sizeof(pDialog));
		}
	
	}
	strcat(pDialog, "{A9C4E4}创建一个传送", sizeof(pDialog));
	ShowPlayerDialog(playerid, Dialog_MyTeleport, DIALOG_STYLE_TABLIST_HEADERS, "我的传送", pDialog, "选择","关闭");
	
	return 1;
}
A dynamic dialog.I just want to get '%d'(TeleportData[i][ID]) from inputtext.Instead of all string
How to do it?
Reply


Messages In This Thread
Get number from string - by 3417512908 - 30.07.2018, 02:13
Re: Get number from string - by Rufio - 30.07.2018, 02:24
Re: Get number from string - by 3417512908 - 30.07.2018, 02:30
Re: Get number from string - by Rufio - 30.07.2018, 02:31

Forum Jump:


Users browsing this thread: 1 Guest(s)