All pastes #761061 Raw Edit

Meins

public text v1 · immutable
·published 2007-11-04 16:17 UTC
rendered paste body
// Action: Player entered a command
// Problem: textdraw gets displayed only randomly. Second attempt mostly works.
	new Text:playertext;
	playertext = TextDrawCreate(608.0,100.0,"Welcome!");
	TextDrawTextSize(playertext,111.0,17.0);
	TextDrawFont(playertext, 1);
	TextDrawLetterSize(playertext,0.5,0.9);
	TextDrawAlignment(playertext,3);
	TextDrawColor(playertext,COLOR_BEIGE);
	TextDrawUseBox(playertext,false);
	TextDrawShowForPlayer(playerid, playertext);
	players[ playerid ][ pStats ] = playertext;

// Action: Player entered another command
// Problem: Sometimes it just stays there
	TextDrawDestroy(players[ playerid ][ pStats ]);

//Global
new Text:ScoreTD[TEAM_COUNT];

// OnFilterScriptInit
	new i, y;
	for (i=0;i<sizeof(DMLogTD);i++) {
		y = 380 + i* 14;
		DMLogTD[i] = TextDrawCreate(638,y," ");
		TextDrawLetterSize(DMLogTD[i], 0.3, 0.9);
		TextDrawAlignment(DMLogTD[i], 3);
		TextDrawColor(DMLogTD[i], COLOR_WHITE);
		TextDrawSetOutline(DMLogTD[i], 1);
		TextDrawFont(DMLogTD[i], 1);
	}
	for (i=0;i<sizeof(ScoreTD);i++) {
		y = 350-(sizeof(ScoreTD)*12) + i*12;
		ScoreTD[i] = TextDrawCreate(2,y," ");
		TextDrawLetterSize(ScoreTD[i], 0.25, 0.85);
		TextDrawAlignment(ScoreTD[i], 0);
		TextDrawColor(ScoreTD[i], COLOR_WHITE);
		TextDrawSetOutline(ScoreTD[i], 1);
		TextDrawFont(ScoreTD[i], 1);
	}

//OnFilterScriptExit
//Problem: Nothing happens -.-
	for (i=0; i<sizeof(ScoreTD); i++) {
		TextDrawDestroy(ScoreTD[i]);
	}
	for (i=0; i<sizeof(DMLogTD); i++) {
		TextDrawDestroy(DMLogTD[i]);
	}