Dialog, tags replace
#1

Hello, I want to ask you, I have a dialogue, and it got the information about the players (location, etc ..) and I need to do to make the brand '' replaced the word "Unknown"



That's the tag ( ' ' ) replace (Unknown) knows someone how to do it?

There is original script from Scavenge & Survive (SouthclawJK)

https://raw.githubusercontent.com/So...er/country.pwn

I was inspired by this one

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

	format(output, len, "\
		Hostname: '%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;
}
Reply
#2

Try this.

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

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

    return 
1;

Reply
#3

Without errors and warnings, but unfortunately Pawn Compiler stopped working(Windows Box): / I use the #include <checkex.pwn>

// But only your code
Reply
#4

I use it as headers, which I put into the script #include <checkex.pwn> when I'm with checkex.pwn compiles and everything works fine, but when the code compiles together with checkex.pwn and Pawn Compiler stops working. someone do not know anyone advice how to do it?
Reply
#5

Someone help ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)