14.02.2011, 01:34
pawn Код:
new Text:EXP;
new Text:LVL[MAX_PLAYERS];
new Text:NUMBER[MAX_PLAYERS];
forward TextdrawUpdater();
public OnGameModeInit()
{
SetTimer("TextdrawUpdater", 5000, 1);
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
LVL[playerid] = TextDrawCreate(592.000000, 440.000000, "LV:0");
TextDrawBackgroundColor(LVL[playerid], 255);
TextDrawFont(LVL[playerid], 1);
TextDrawLetterSize(LVL[playerid], 0.209999, 0.699899);
TextDrawColor(LVL[playerid], -1);
TextDrawSetOutline(LVL[playerid], 0);
TextDrawSetProportional(LVL[playerid], 1);
TextDrawSetShadow(LVL[playerid], 1);
NUMBER[playerid] = TextDrawCreate(566.000000, 440.000000, "0/15");
TextDrawBackgroundColor(NUMBER[playerid], 255);
TextDrawFont(NUMBER[playerid], 1);
TextDrawLetterSize(NUMBER[playerid], 0.210000, 0.699999);
TextDrawColor(NUMBER[playerid], -1);
TextDrawSetOutline(NUMBER[playerid], 0);
TextDrawSetProportional(NUMBER[playerid], 1);
TextDrawSetShadow(NUMBER[playerid], 1);
}
}
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, EXP);
TextDrawShowForPlayer(playerid, LVL[playerid]);
TextDrawShowForPlayer(playerid, NUMBER[playerid]);
return 1;
}
public TextdrawUpdater()
{
for(new playerid = 0; playerid < MAX_PLAYERS; playerid++)
{
TextDrawSetString(LVL[playerid], "blabla");
TextDrawSetString(NUMBER[playerid], "blabla2");
}
return 1;
}