[Ajuda] Textdraw
#1

Alguem com boa disposiзгo para me ajudar a colocar no textdraw EXP, KILLS, DEATHS?


Код:
// All credits for iPLEOMAX's textdraw editor and Ho$s@ ( Scripting ) :D
#include <a_samp>

new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new Text:Textdraw6;
new Text:Textdraw7;
new Text:Textdraw8;
new Text:Textdraw9;
new Text:Textdraw10;
new Text:Textdraw11;
new Text:Textdraw12;
new Text:Textdraw13;

new UT[MAX_PLAYERS];
new UT2[MAX_PLAYERS];

public OnFilterScriptInit()
{
	Textdraw0 = TextDrawCreate(646.000000, 401.713348, "usebox");
	TextDrawLetterSize(Textdraw0, 0.000000, 8.432957);
	TextDrawTextSize(Textdraw0, -5.199996, 0.000000);
	TextDrawAlignment(Textdraw0, 1);
	TextDrawColor(Textdraw0, 0);
	TextDrawUseBox(Textdraw0, true);
	TextDrawBoxColor(Textdraw0, -2147483548);
	TextDrawSetShadow(Textdraw0, 0);
	TextDrawSetOutline(Textdraw0, 0);
	TextDrawFont(Textdraw0, 0);

	Textdraw1 = TextDrawCreate(115.999916, 434.560028, "~>~ Server-Website.Domain ~<~");
	TextDrawLetterSize(Textdraw1, 0.713998, 1.473065);
	TextDrawAlignment(Textdraw1, 1);
	TextDrawColor(Textdraw1, -16776961);
	TextDrawSetShadow(Textdraw1, 0);
	TextDrawSetOutline(Textdraw1, 1);
	TextDrawBackgroundColor(Textdraw1, -1061109505);
	TextDrawFont(Textdraw1, 2);
	TextDrawSetProportional(Textdraw1, 1);

	Textdraw2 = TextDrawCreate(198.399734, 414.399993, "Cash : ~R~pCash");
	TextDrawLetterSize(Textdraw2, 0.529200, 1.682132);
	TextDrawAlignment(Textdraw2, 1);
	TextDrawColor(Textdraw2, -5963521);
	TextDrawSetShadow(Textdraw2, 0);
	TextDrawSetOutline(Textdraw2, 1);
	TextDrawBackgroundColor(Textdraw2, 51);
	TextDrawFont(Textdraw2, 3);
	TextDrawSetProportional(Textdraw2, 1);

	Textdraw3 = TextDrawCreate(168.799896, 415.893371, "]");
	TextDrawLetterSize(Textdraw3, 0.511600, 1.458132);
	TextDrawAlignment(Textdraw3, 1);
	TextDrawColor(Textdraw3, 8388863);
	TextDrawSetShadow(Textdraw3, 0);
	TextDrawSetOutline(Textdraw3, 1);
	TextDrawBackgroundColor(Textdraw3, 8388863);
	TextDrawFont(Textdraw3, 2);
	TextDrawSetProportional(Textdraw3, 1);

	Textdraw4 = TextDrawCreate(4.000013, 415.893432, "]");
	TextDrawLetterSize(Textdraw4, 0.525200, 1.600000);
	TextDrawAlignment(Textdraw4, 1);
	TextDrawColor(Textdraw4, 8388863);
	TextDrawSetShadow(Textdraw4, 0);
	TextDrawSetOutline(Textdraw4, 1);
	TextDrawBackgroundColor(Textdraw4, 8388863);
	TextDrawFont(Textdraw4, 2);
	TextDrawSetProportional(Textdraw4, 1);

	Textdraw5 = TextDrawCreate(32.799999, 415.146728, "Score : ~R~pLevel");
	TextDrawLetterSize(Textdraw5, 0.449999, 1.600000);
	TextDrawAlignment(Textdraw5, 1);
	TextDrawColor(Textdraw5, -5963521);
	TextDrawSetShadow(Textdraw5, 0);
	TextDrawSetOutline(Textdraw5, 1);
	TextDrawBackgroundColor(Textdraw5, 51);
	TextDrawFont(Textdraw5, 3);
	TextDrawSetProportional(Textdraw5, 1);

	Textdraw6 = TextDrawCreate(527.200073, 397.973083, "]");
	TextDrawLetterSize(Textdraw6, 0.449999, 1.600000);
	TextDrawAlignment(Textdraw6, 1);
	TextDrawColor(Textdraw6, 65535);
	TextDrawSetShadow(Textdraw6, 0);
	TextDrawSetOutline(Textdraw6, 1);
	TextDrawBackgroundColor(Textdraw6, 8388863);
	TextDrawFont(Textdraw6, 2);
	TextDrawSetProportional(Textdraw6, 1);
	
	Textdraw7 = TextDrawCreate(193.599975, 391.999908, "Server ~R~Name");
	TextDrawLetterSize(Textdraw7, 1.052400, 1.824000);
	TextDrawAlignment(Textdraw7, 1);
	TextDrawColor(Textdraw7, -1);
	TextDrawSetShadow(Textdraw7, 0);
	TextDrawSetOutline(Textdraw7, 1);
	TextDrawBackgroundColor(Textdraw7, 51);
	TextDrawFont(Textdraw7, 3);
	TextDrawSetProportional(Textdraw7, 1);
	
	Textdraw8 = TextDrawCreate(144.800155, 397.973419, "]");
	TextDrawLetterSize(Textdraw8, 0.449999, 1.600000);
	TextDrawAlignment(Textdraw8, 1);
	TextDrawColor(Textdraw8, 65535);
	TextDrawSetShadow(Textdraw8, 0);
	TextDrawSetOutline(Textdraw8, 1);
	TextDrawBackgroundColor(Textdraw8, 8388863);
	TextDrawFont(Textdraw8, 2);
	TextDrawSetProportional(Textdraw8, 1);

	Textdraw9 = TextDrawCreate(510.399749, 413.653259, "Skin : ~R~pSkin");
	TextDrawLetterSize(Textdraw9, 0.518800, 1.838932);
	TextDrawAlignment(Textdraw9, 1);
	TextDrawColor(Textdraw9, -5963521);
	TextDrawSetShadow(Textdraw9, 0);
	TextDrawSetOutline(Textdraw9, 1);
	TextDrawBackgroundColor(Textdraw9, 51);
	TextDrawFont(Textdraw9, 3);
	TextDrawSetProportional(Textdraw9, 1);

	Textdraw10 = TextDrawCreate(335.199645, 414.400054, "]");
	TextDrawLetterSize(Textdraw10, 0.519599, 1.711999);
	TextDrawAlignment(Textdraw10, 1);
	TextDrawColor(Textdraw10, 8388863);
	TextDrawSetShadow(Textdraw10, 0);
	TextDrawSetOutline(Textdraw10, 1);
	TextDrawBackgroundColor(Textdraw10, 8388863);
	TextDrawFont(Textdraw10, 2);
	TextDrawSetProportional(Textdraw10, 1);

	Textdraw11 = TextDrawCreate(371.199768, 412.906616, "Ping : ~R~pDeaths");
	TextDrawLetterSize(Textdraw11, 0.474799, 1.734400);
	TextDrawAlignment(Textdraw11, 1);
	TextDrawColor(Textdraw11, -5963521);
	TextDrawSetShadow(Textdraw11, 0);
	TextDrawSetOutline(Textdraw11, 1);
	TextDrawBackgroundColor(Textdraw11, 51);
	TextDrawFont(Textdraw11, 3);
	TextDrawSetProportional(Textdraw11, 1);

	Textdraw12 = TextDrawCreate(483.200103, 414.400207, "]");
	TextDrawLetterSize(Textdraw12, 0.484400, 1.749333);
	TextDrawAlignment(Textdraw12, 1);
	TextDrawColor(Textdraw12, 8388863);
	TextDrawSetShadow(Textdraw12, 0);
	TextDrawSetOutline(Textdraw12, 1);
	TextDrawBackgroundColor(Textdraw12, 8388863);
	TextDrawFont(Textdraw12, 2);
	TextDrawSetProportional(Textdraw12, 1);

	Textdraw13 = TextDrawCreate(623.999877, 414.400054, "]");
	TextDrawLetterSize(Textdraw13, 0.507600, 1.883733);
	TextDrawAlignment(Textdraw13, 1);
	TextDrawColor(Textdraw13, 8388863);
	TextDrawSetShadow(Textdraw13, 0);
	TextDrawSetOutline(Textdraw13, 1);
	TextDrawBackgroundColor(Textdraw13, 8388863);
	TextDrawFont(Textdraw13, 2);
	TextDrawSetProportional(Textdraw13, 1);

	for(new i; i < MAX_PLAYERS; i ++)
	{
		if(IsPlayerConnected(i))
		{
			TextDrawShowForPlayer(i, Textdraw0);
			TextDrawShowForPlayer(i, Textdraw1);
			TextDrawShowForPlayer(i, Textdraw2);
			TextDrawShowForPlayer(i, Textdraw3);
			TextDrawShowForPlayer(i, Textdraw4);
			TextDrawShowForPlayer(i, Textdraw5);
			TextDrawShowForPlayer(i, Textdraw6);
			TextDrawShowForPlayer(i, Textdraw7);
			TextDrawShowForPlayer(i, Textdraw8);
			TextDrawShowForPlayer(i, Textdraw9);
  			TextDrawShowForPlayer(i, Textdraw10);
			TextDrawShowForPlayer(i, Textdraw11);
			TextDrawShowForPlayer(i, Textdraw12);
			TextDrawShowForPlayer(i, Textdraw13);
 			SetTimerEx("UpdateText", 1000, false, "i", i);
		}
	}
	return 1;
}

public OnFilterScriptExit()
{
	TextDrawHideForAll(Textdraw0);
	TextDrawDestroy(Textdraw0);
	TextDrawHideForAll(Textdraw1);
	TextDrawDestroy(Textdraw1);
	TextDrawHideForAll(Textdraw2);
	TextDrawDestroy(Textdraw2);
	TextDrawHideForAll(Textdraw3);
	TextDrawDestroy(Textdraw3);
	TextDrawHideForAll(Textdraw4);
	TextDrawDestroy(Textdraw4);
	TextDrawHideForAll(Textdraw5);
	TextDrawDestroy(Textdraw5);
	TextDrawHideForAll(Textdraw6);
	TextDrawDestroy(Textdraw6);
	TextDrawHideForAll(Textdraw7);
	TextDrawDestroy(Textdraw7);
	TextDrawHideForAll(Textdraw8);
	TextDrawDestroy(Textdraw8);
	TextDrawHideForAll(Textdraw9);
	TextDrawDestroy(Textdraw9);
	TextDrawHideForAll(Textdraw10);
	TextDrawDestroy(Textdraw10);
	TextDrawHideForAll(Textdraw11);
	TextDrawDestroy(Textdraw11);
	TextDrawHideForAll(Textdraw12);
	TextDrawDestroy(Textdraw12);
	TextDrawHideForAll(Textdraw13);
	TextDrawDestroy(Textdraw13);
	return 1;
}

public OnPlayerConnect(playerid)
{
	TextDrawShowForPlayer(playerid, Textdraw0);
	TextDrawShowForPlayer(playerid, Textdraw1);
	TextDrawShowForPlayer(playerid, Textdraw2);
	TextDrawShowForPlayer(playerid, Textdraw3);
	TextDrawShowForPlayer(playerid, Textdraw4);
	TextDrawShowForPlayer(playerid, Textdraw5);
	TextDrawShowForPlayer(playerid, Textdraw6);
	TextDrawShowForPlayer(playerid, Textdraw7);
	TextDrawShowForPlayer(playerid, Textdraw8);
	TextDrawShowForPlayer(playerid, Textdraw9);
	TextDrawShowForPlayer(playerid, Textdraw10);
	TextDrawShowForPlayer(playerid, Textdraw11);
	TextDrawShowForPlayer(playerid, Textdraw12);
	TextDrawShowForPlayer(playerid, Textdraw13);
	UT[playerid] = SetTimerEx("UpdateText", 1000, false, "i", playerid);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    KillTimer(UT[playerid]);
    KillTimer(UT2[playerid]);
	return 1;
}

forward UpdateText(playerid);
public UpdateText(playerid)
{
    new pDeaths[16], pLevel[16], pSkin[16], pCash[16];
    format(pDeaths, sizeof(pDeaths), "Ping :~R~ %d", GetPlayerPing(playerid));
	TextDrawSetString(Textdraw11, pDeaths);
    format(pLevel, sizeof(pLevel), "Score :~R~ %d", GetPlayerScore(playerid));
	TextDrawSetString(Textdraw5, pLevel);
    format(pSkin, sizeof(pSkin), "Skin :~R~ %d", GetPlayerSkin(playerid));
	TextDrawSetString(Textdraw9, pSkin);
    format(pCash, sizeof(pCash), "Cash :~R~ %d $", GetPlayerMoney(playerid));
	TextDrawSetString(Textdraw2, pCash);
	UT2[playerid] = SetTimerEx("UpdateText2", 3000, true, "i", playerid);
    return 1;
}

forward UpdateText2(playerid);
public UpdateText2(playerid)
{
    new pLevel[16], pDeaths[16], pSkin[16], pCash[16];
    format(pDeaths, sizeof(pDeaths), "Kills :~R~ %d", GetPlayerPing(playerid));
	TextDrawSetString(Textdraw11, pDeaths);
    format(pLevel, sizeof(pLevel), "Level :~R~ %d", GetPlayerScore(playerid));
	TextDrawSetString(Textdraw5, pLevel);
    format(pSkin, sizeof(pSkin), "Skin :~R~ %d", GetPlayerSkin(playerid));
	TextDrawSetString(Textdraw9, pSkin);
    format(pCash, sizeof(pCash), "Cash :~R~ %d $", GetPlayerMoney(playerid));
	TextDrawSetString(Textdraw2, pCash);
    return 1;
}
Reply


Messages In This Thread
Textdraw - by LKING - 25.07.2014, 12:57

Forum Jump:


Users browsing this thread: 1 Guest(s)