[Pedido] TextDraw - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Pedido] TextDraw (
/showthread.php?tid=352656)
[Pedido] TextDraw -
goku114 - 20.06.2012
oi pessoal tudo belezinha?
bom queria saber como eu faзo isso para mostrar quantasa mortes o player tem
aqui o text
pawn Код:
matou = TextDrawCreate(20.000000, 186.000000, "Matou:");
TextDrawBackgroundColor(matou, 255);
TextDrawFont(matou, 2);
TextDrawLetterSize(matou, 0.260000, 1.200000);
TextDrawColor(matou, -1);
TextDrawSetOutline(matou, 0);
TextDrawSetProportional(matou, 1);
TextDrawSetShadow(matou, 1);
vlws
Re: [Pedido] TextDraw -
EditPawn - 20.06.2012
acho que й isso ae man '-'
pawn Код:
matou = TextDrawCreate(20.000000, 186.000000, "Matou: %d");
TextDrawBackgroundColor(matou, 255);
TextDrawFont(matou, 2);
TextDrawLetterSize(matou, 0.260000, 1.200000);
TextDrawColor(matou, -1);
TextDrawSetOutline(matou, 0);
TextDrawSetProportional(matou, 1);
TextDrawSetShadow(matou, 1);
public OnPlayerDeath(playerid, killerid, reason)
{
format(Str, sizeof(Str), "Matou: %s", PlayerInfo[killerid][pKills]); ///No lugar de PlayerInfo[killerid][pKills] troque pela var de kills do seu gm
TextDrawSetString(matou, Str);
TextDrawShowForPlayer(killerid, matou);
return 1;
}
Re: [Pedido] TextDraw -
.FuneraL. - 20.06.2012
pawn Код:
// Topo do GM
enum pInfo
{
pKills
};
PlayerInfo[MAX_PLAYERS][pInfo];
forward Kills(playerid);
public Kills(playerid)
{
new String[50];
format(String, sizeof(String), "Matou: %d", PlayerInfo[playerid][pKills]);
TextDrawSetString(matou, String);
return 1;
}
//OnPlayerDeath
PlayerInfo[killerid][pKills]++;
E Mantenha essa sua Textdraw Assim ^^
Re: [Pedido] TextDraw -
blacktrindade - 20.06.2012
Quote:
Originally Posted by EditPawn
acho que й isso ae man '-'
pawn Код:
matou = TextDrawCreate(20.000000, 186.000000, "Matou: %d"); TextDrawBackgroundColor(matou, 255); TextDrawFont(matou, 2); TextDrawLetterSize(matou, 0.260000, 1.200000); TextDrawColor(matou, -1); TextDrawSetOutline(matou, 0); TextDrawSetProportional(matou, 1); TextDrawSetShadow(matou, 1); public OnPlayerDeath(playerid, killerid, reason) { format(Str, sizeof(Str), "Matou: %s", PlayerInfo[killerid][pKills]); ///No lugar de PlayerInfo[killerid][Kills] troque pela var de kills do seu gm TextDrawSetString(matou, Str); TextDrawShowForPlayer(killerid, matou); return 1; }
|
Corrigindo o Format
pawn Код:
format(Str, sizeof(Str), "Matou: %d", PlayerInfo[killerid][pKills]); ///No lugar de PlayerInfo[killerid][Kills]
Re: [Pedido] TextDraw -
.FuneraL. - 20.06.2012
Quote:
Originally Posted by blacktrindade
Corrigindo o Format
pawn Код:
format(Str, sizeof(Str), "Matou: %d", PlayerInfo[killerid][pKills]); ///No lugar de PlayerInfo[killerid][Kills]
|
Para setar a string, tem que ser igual o meu black, pois ele seta a string do "playerid" e quando ele mata , conta pro "killerid", ou seja, o "killerid" torna a ser "playerid", quando nгo hб mais aзгo.
Re: [Pedido] TextDraw -
RoacH` - 20.06.2012
pawn Код:
static
Text:Matou[MAX_PLAYERS],
Deaths[MAX_PLAYERS],
text[20]
;
public OnGameModeInit()
{
for(new x = 0; x < MAX_PLAYERS; x++) {
Matou[x] = TextDrawCreate(20.000000, 186.000000, " ");
TextDrawBackgroundColor(Matou[x], 255);
TextDrawFont(Matou[x], 2);
TextDrawLetterSize(Matou[x], 0.260000, 1.200000);
TextDrawColor(Matou[x], -1);
TextDrawSetOutline(Matou[x], 0);
TextDrawSetProportional(Matou[x], 1);
TextDrawSetShadow(Matou[x], 1);
}
return true;
}
public OnPlayerUpdate(playerid)
{
format(text, sizeof(text), "Matou: %d", Deaths[playerid]);
TextDrawShowForPlayer(playerid, Matou[playerid]);
TextDrawSetString(Matou[playerid], text);
return true;
}
public OnPlayerDeath(playerid, killerid, reason)
{
Deaths[killerid] ++;
return true;
}
Re: [Pedido] TextDraw -
EditPawn - 20.06.2012
@EDIT
dxa qto --'
Re: [Pedido] TextDraw -
goku114 - 20.06.2012
Quote:
Originally Posted by EditPawn
acho que й isso ae man '-'
pawn Код:
matou = TextDrawCreate(20.000000, 186.000000, "Matou: %d"); TextDrawBackgroundColor(matou, 255); TextDrawFont(matou, 2); TextDrawLetterSize(matou, 0.260000, 1.200000); TextDrawColor(matou, -1); TextDrawSetOutline(matou, 0); TextDrawSetProportional(matou, 1); TextDrawSetShadow(matou, 1); public OnPlayerDeath(playerid, killerid, reason) { format(Str, sizeof(Str), "Matou: %s", PlayerInfo[killerid][pKills]); ///No lugar de PlayerInfo[killerid][pKills] troque pela var de kills do seu gm TextDrawSetString(matou, Str); TextDrawShowForPlayer(killerid, matou); return 1; }
|
Vlw viu

,mas nгo era isso
Quote:
Originally Posted by .FuneraL.
pawn Код:
// Topo do GM enum pInfo { pKills };
PlayerInfo[MAX_PLAYERS][pInfo];
forward Kills(playerid);
public Kills(playerid) { new String[50]; format(String, sizeof(String), "Matou: %d", PlayerInfo[playerid][pKills]); TextDrawSetString(matou, String); return 1; }
//OnPlayerDeath
PlayerInfo[killerid][pKills]++;
E Mantenha essa sua Textdraw Assim ^^
|
VLW