new Text:tematou,
public OnGameModeInit()
{
tematou = TextDrawCreate(00.000000, 000.000000, " ");
TextDrawAlignment(tematou, 0);
TextDrawBackgroundColor(tematou, 000);
TextDrawFont(tematou, 0);
TextDrawLetterSize(tematou, 0.000000, 0.000000);
TextDrawColor(tematou, 0);
TextDrawSetOutline(tematou, 0);
TextDrawSetProportional(tematou, 0);
TextDrawSetShadow(tematou, 0);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new killernick[24];
GetPlayerName(killerid, killernick, sizeof(killernick));
new string[128];
format(string, sizeof(string), "%s te matou", killernick);
TextDrawShowForPlayer(playerid, tematou);
}
}
new Text:tematou,
public OnGameModeInit()
{
tematou = TextDrawCreate(00.000000, 000.000000, " ");
TextDrawAlignment(tematou, 0);
TextDrawBackgroundColor(tematou, 000);
TextDrawFont(tematou, 0);
TextDrawLetterSize(tematou, 0.000000, 0.000000);
TextDrawColor(tematou, 0);
TextDrawSetOutline(tematou, 0);
TextDrawSetProportional(tematou, 0);
TextDrawSetShadow(tematou, 0);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new killernick[24];
GetPlayerName(killerid, killernick, sizeof(killernick));
new string[128];
TextDrawHideForPlayer(playerid, tematou); // Evitar bug's, se der mais bug's remova.
format(string, sizeof(string), "%s te matou", killernick);
TextDrawSetString(tematou, string);
TextDrawShowForPlayer(playerid, tematou);
}
}
TextDrawShowForPlayer mostra o text draw para o jogador para alterar o texto vocк deve usar TextDrawSetString
|
Colocando em prбtica o que o multi disse:
pawn Код:
|
TextDrawShowForPlayer mostra o text draw para o jogador para alterar o texto vocк deve usar TextDrawSetString
|
new Text:tematou,
public OnGameModeInit()
{
tematou = TextDrawCreate(00.000000, 000.000000, " ");
TextDrawAlignment(tematou, 0);
TextDrawBackgroundColor(tematou, 000);
TextDrawFont(tematou, 0);
TextDrawLetterSize(tematou, 0.000000, 0.000000);
TextDrawColor(tematou, 0);
TextDrawSetOutline(tematou, 0);
TextDrawSetProportional(tematou, 0);
TextDrawSetShadow(tematou, 0);
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID)
{
new killernick[24];
GetPlayerName(killerid, killernick, sizeof(killernick));
new string[128];
TextDrawHideForPlayer(playerid, tematou); // Evitar bug's, se der mais bug's remova.
format(string, sizeof(string), "%s te matou", killernick);
TextDrawSetString(tematou, string);
TextDrawShowForPlayer(playerid, tematou);
SetTimerEx("Esconder",2000,false,"i",playerid);//Em 2 Segundos Chama O Public E O Textdraw Some Para O Player Morto
}
}
forward Esconder(playerid);
public Esconder(playerid)
{
TextDrawHideForPlayer(playerid, tematou);//Esconde A Textdraw
}