31.12.2012, 06:57
Como crio TexDraw no inicio do server tipo na tela de login aparece o nome do server?
#include <a_samp>
new Text:Textdraw0;
new Text:Textdraw1;
public OnFilterScriptInit()
{
// Create the textdraws:
Textdraw0 = TextDrawCreate(523.000000, 414.000000, "SiLLenTz");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.559999, 1.800000);
TextDrawColor(Textdraw0, 65535);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawSetSelectable(Textdraw0, 0);
Textdraw1 = TextDrawCreate(572.000000, 425.000000, "KillerS");
TextDrawBackgroundColor(Textdraw1, 255);
TextDrawFont(Textdraw1, 1);
TextDrawLetterSize(Textdraw1, 0.559999, 1.800000);
TextDrawColor(Textdraw1, -16776961);
TextDrawSetOutline(Textdraw1, 1);
TextDrawSetProportional(Textdraw1, 1);
TextDrawSetSelectable(Textdraw1, 0);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw0);
TextDrawShowForPlayer(i, Textdraw1);
}
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw1);
return 1;
}
// Resposta do dialog de login/registro
/* TextDrawHideForAll(Textdraw0);
TextDrawDestroy(Textdraw0);
TextDrawHideForAll(Textdraw1);
TextDrawDestroy(Textdraw1);*/
Exemplo!
pawn Код:
|
GameTextForPlayer(playerid, "~y~Bem vindo ~g~ ao nosso ~p~servidor", 5000, 1);
public OnPlayerConnect(playerid)
GameTextForPlayer(playerid, "~y~Bem vindo ~g~ ao nosso ~p~servidor", 5000, 1);
new Text: NomeServerInicio;
NomeServerInicio = TextDrawCreate(316.5, 200.5, "NOME DO SEU SERVIDOR"); // Coloque aqui o nome do seu servidor
TextDrawFont(NomeServerInicio, 1);
TextDrawColor(NomeServerInicio, 0xFFFFFFFF);
TextDrawLetterSize(NomeServerInicio, 1.0, 4.0);
TextDrawSetOutline(NomeServerInicio, 1);
TextDrawSetProportional(NomeServerInicio, 1);
TextDrawAlignment(NomeServerInicio, 2);
TextDrawBackgroundColor(NomeServerInicio, 0x000000FF);
TextDrawSetShadow(NomeServerInicio, 1);
TextDrawShowForPlayer(playerid, NomeServerInicio); // Irб aparecer o TextDraw quando o player conectar
TextDrawHideForPlayer(playerid, NomeServerInicio); // Irб desaparecer o TextDraw quando o player spawnar