Jump to content
  • 0

pomoc Tituli


Jurajvocny

Dotaz

Čaute. Ja by som sa chcel opytať ze ako by sa dali spraviť titul.

Teraz to mám takto.

 

public OnPlayerText(plaerid, text[])

{

if(PlayerInfo[playerid][pAdminLevel] == 0)

{

new s[200];

format(s,200,""COL_YELLOW"[ Hráč ] %s "COLOR_WHITE": %s",PlayerName(playerid),text);

SendClientMessageToAll(-1,s)-

return 0;

}

return 1;

}

Teraz to je tak ze [ Hráč ] a meno hráča je žlté a text bieli.

Ale ja to chcem taj aby [ Hráč ] bolo žltím a meno hráča farbou ktoru ma a môže si ju zmeniť.

 

Ďakujem.

 

Ps: pisal som to na mobili tak sa ospravedlnujem za chiby.

Link to comment
Share on other sites

8 odpovědí na tuto otázku

Recommended Posts

  • 0


if(PlayerInfo[playerid][pAdminLevel] == 0)
{
new s[200];
format(s,200,""COL_YELLOW"[ Hráč ] %s "COLOR_WHITE": %s",PlayerName(playerid),text);
SendClientMessageToAll(-1,s)-
return 0;
}


if(PlayerInfo[playerid][pAdminLevel] == 1)
{
new s[200];
format(s,200,""COL_YELLOW"[ OhOhMyGod! Level One!] %s "COLOR_WHITE": %s",PlayerName(playerid),text);
SendClientMessageToAll(-1,s)-
return 0;
}
Link to comment
Share on other sites

  • 0

~> Ach jo, to šetření si práce a paměti... to šetření...

 

 

if (!PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ Hráč ] %s {FFFFFF}: %s",PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}

/* :-----------------------------: */

if (PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ OhOhMyGod! Level One!] %s {FFFFFF}: %s",PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}
~> Pro další levely u druhé podmínky jen přidáš operátory a čísla.

 

A ani jeden z vas mu neponuze s cim chce pomoct :d

 

 

format(s, 200, ""COL_YELLOW"[ Hráč ] {%06x}%s "COLOR_WHITE": %s", PlayerName(playerid), GetPlayerColor(playerid) >>> 8, text);

 

if (!PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ Hráč ] {%06x}%s {FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}
Edited by SkiBig18
Link to comment
Share on other sites

  • 0

A ani jeden z vas mu nepomuze s cim chce pomoct :d

 

format(s, 200, ""COL_YELLOW"[ Hráč ] {%06x}%s "COLOR_WHITE": %s", GetPlayerColor(playerid) >>> 8, PlayerName(playerid), text);

//EDIT: ups

Edited by Lukasz
Link to comment
Share on other sites

  • 0

~> Ach jo, to šetření si práce a paměti... to šetření...

 

 

if (!PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ Hráč ] %s {FFFFFF}: %s",PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}

/* :-----------------------------: */

if (PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ OhOhMyGod! Level One!] %s {FFFFFF}: %s",PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}
~> Pro další levely u druhé podmínky jen přidáš operátory a čísla.

 

 

if (!PlayerInfo[playerid][pAdminLevel]) {

	new 
		sString[144 + 1];
	format(sString, sizeof(sString), "[ Hráč ] {%06x}%s {FFFFFF}: %s", GetPlayerColor(playerid) >>> 8, PlayerName(playerid), text); SendClientMessageToAll(0xFFFF0000, sString);
	return false;
}

když už mluvíš o šetření. dá se tam udělat i jenom jedna proměna se stringem. :d

Link to comment
Share on other sites

  • 0

když už mluvíš o šetření. dá se tam udělat i jenom jedna proměna se stringem. :d

~> Já vím. Já pracoval s tím, co jsem dostal. A když už tom tak pěkně mluvíš, proč jsi to rovnou neudělal sám? :d.

Link to comment
Share on other sites

  • 0

~> Já vím. Já pracoval s tím, co jsem dostal. A když už tom tak pěkně mluvíš, proč jsi to rovnou neudělal sám? :d.

platí mě snad zato ?:d nebudu jim tu dávat 420 MLG PRO optimalizovanej code

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...