format
#1

Hey, how do I replace the characters ( ' ' ) to output "Unknown"?

Код:
stock GetPlayerCountryDataAsString(playerid, output[], len = sizeof(output))
{
	if(!IsPlayerConnected(playerid))
		return 0;

	format(output, len, "\
		HHostname: '%s'\n\
		Code: '%s'\n\
		Country: '%s'\n\
		Region: '%s'\n\
		ISP: '%s'\n\
		Proxy: %s",
		PlayerCountryData[playerid][cntr_Hostname],
		PlayerCountryData[playerid][cntr_Code],
		PlayerCountryData[playerid][cntr_Country],
		PlayerCountryData[playerid][cntr_Region],
		PlayerCountryData[playerid][cntr_ISP],
		PlayerCountryData[playerid][cntr_Proxy] ? ("Yes") : ("No"));

	return 1;
}


That's what I want



Here's my code http://pastebin.com/btkB934q (SouthclawJK & Scavenge Survive)

https://github.com/Southclaw/Scaveng...er/country.pwn
Reply


Messages In This Thread
format - by FinStar - 19.03.2016, 19:22
Re: format - by YouServ - 19.03.2016, 19:32
Re: format - by FinStar - 19.03.2016, 19:35
Re: format - by JeaSon - 19.03.2016, 19:39
Re: format - by introzen - 19.03.2016, 19:53
Re: format - by FinStar - 19.03.2016, 20:41
Re: format - by YouServ - 19.03.2016, 20:54
Re: format - by introzen - 19.03.2016, 21:01
Re: format - by FinStar - 20.03.2016, 10:48
Re: format - by YouServ - 20.03.2016, 11:04

Forum Jump:


Users browsing this thread: 1 Guest(s)