13.03.2010, 11:35
pawn Код:
#include <a_samp>
new Text:Textdraw0, timerz;
forward ChangeText();
public OnFilterScriptInit()
{
Textdraw0 = TextDrawCreate(499.000000, 119.000000, "SA-MP");
TextDrawBackgroundColor(Textdraw0, 255);
TextDrawFont(Textdraw0, 2);
TextDrawLetterSize(Textdraw0, 0.500000, 1.000000);
TextDrawColor(Textdraw0, 65535);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
TextDrawUseBox(Textdraw0, 1);
TextDrawBoxColor(Textdraw0, 102);
TextDrawTextSize(Textdraw0, 563.000000, 3.000000);
SetTimer("ChangeText", 5000, 1);
for(new i; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
TextDrawShowForPlayer(i, Textdraw0);
}
}
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw0);
return 1;
}
public ChangeText()
{
if(timerz == 0)
{
TextDrawSetString(Textdraw0, "SA:MP");
timerz = 1;
}
else if(timerz == 1)
{
TextDrawSetString(Textdraw0, "Test!");
timerz = 2;
}
else if(timerz == 2)
{
TextDrawSetString(Textdraw0, "Outro String");
timerz = 0;
}
}