11.07.2010, 17:02
Bueno he estado mucho en SA-MP pero nunca habia posteado por que no sabia que :/
ya que me encantan los textdraw se me ocurrio hacer uno en un movimiento...
aca les dejo el code:
Primero los forward
NEW
ENUM
OnGameModeInit
OnPlayerRequestClass
OnPlayerSpawn
PUBLIC
PD: Disculpenme por hacerlo en el mismo foro esque soy nuevo en esto del pastebin y cosas asi
ya que me encantan los textdraw se me ocurrio hacer uno en un movimiento...
aca les dejo el code:
Primero los forward
Код:
forward InicioDraw(texto[],playerid); forward DrawEntrada(playerid);
Код:
new Text:Texto_Intro[MAX_PLAYERS];
Код:
enum pInfo
{
TextDrawEntrada
}
Код:
SetTimer("DrawEntrada",100,1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
Texto_Intro[i] = TextDrawCreate(225.000000,140.000000,"Inicio");
TextDrawFont(Texto_Intro[i],0);
TextDrawColor(Texto_Intro[i],0xAA3333FF);
TextDrawLetterSize(Texto_Intro[i],1.0,1.8000000);
TextDrawSetOutline(Texto_Intro[i],1);
TextDrawSetShadow(Texto_Intro[i],1);
TextDrawSetProportional(Texto_Intro[i],1);
TextDrawBackgroundColor(Texto_Intro[i],0x0000AAFF);
}
Код:
PlayerInfo[playerid][TextDrawEntrada] = 0; DrawEntrada(playerid);
Код:
PlayerInfo[playerid][TextDrawEntrada] = 11;
Код:
public DrawEntrada(playerid)
{
if(PlayerInfo[playerid][TextDrawEntrada] == 0)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw("~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 1;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 1)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 2;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 2)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 3;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 3)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 4;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 4)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 5;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 5)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 6;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 6)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 7;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 7)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 8;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 8)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 9;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 9)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw(" ~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 10;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 10)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
InicioDraw("~y~Revo~r~Gamer~w~Z",playerid);
PlayerInfo[playerid][TextDrawEntrada] = 1;
return 1;
}
if(PlayerInfo[playerid][TextDrawEntrada] == 11)
{
TextDrawHideForPlayer(playerid, Texto_Intro[playerid]);
return 1;
}
return 1;
}
public InicioDraw(texto[],playerid)
{
TextDrawSetString(Texto_Intro[playerid], texto);
TextDrawShowForPlayer(playerid, Texto_Intro[playerid]);
}


