[TextDraw ]Timer and String
#4

Something like that ?

pawn Код:
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;

new BeduerfnissTimer;
new gPlayerLogged[MAX_PLAYERS];
new SpielerInfo[MAX_PLAYERS][Text:MAX_TEXT_DRAWS];
pawn Код:
//OnGameModeInit
BeduerfnissTimer = SetTimer("Bedarfs",180000, 1);

Textdraw0 = TextDrawCreate(x, y, "_");
Textdraw1 = TextDrawCreate(x, y, "_");
Textdraw2 = TextDrawCreate(x, y, "_");
Textdraw3 = TextDrawCreate(x, y, "_");
pawn Код:
forward Bedarfs();
public Bedarfs()
{
    for(new i = 0, string[64]; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            if(gPlayerLogged[i] == 1)
            {
                if(SpielerInfo[i][Textdraw0] < 100)
                {
                    SpielerInfo[i][Textdraw0]++; // Ist das hier die Durst variable ?
                    format(string, sizeof(string), "Durst %d%%", SpielerInfo[i][Textdraw0]);
                    TextDrawSetString(Textdraw0, string);
                }
                if(SpielerInfo[i][Textdraw1] < 100)
                {
                    SpielerInfo[i][Textdraw1]++; // Noch eine ?
                    format(string, sizeof(string), "Durst %d%%", SpielerInfo[i][Textdraw1]);
                    TextDrawSetString(Textdraw1, string);
                }
                if(SpielerInfo[i][Textdraw2] < 100)
                {
                    SpielerInfo[i][Textdraw2]++; // *Verwirrt* :p
                    format(string, sizeof(string), "Durst %d%%", SpielerInfo[i][Textdraw2]);
                    TextDrawSetString(Textdraw2, string);
                }
                if(SpielerInfo[i][Textdraw3] < 100)
                {
                    SpielerInfo[i][Textdraw3]++; // gn8
                    format(string, sizeof(string), "Durst %d%%", SpielerInfo[i][Textdraw3]);
                    TextDrawSetString(Textdraw3, string);
                }
            }
        } // Es gibt auch eine Forumuntergruppe fьr Deutsche
    } // Zwar ist dise so gut wie nie nie besucht, aber man darf dort deutsch reden ^^
}
Reply


Messages In This Thread
[TextDraw ]Timer and String - by Canna - 14.12.2010, 16:49
Re: [TextDraw ]Timer and String - by Nero_3D - 14.12.2010, 17:31
AW: [TextDraw ]Timer and String - by Canna - 14.12.2010, 22:19
Re: AW: [TextDraw ]Timer and String - by Nero_3D - 14.12.2010, 22:42
AW: [TextDraw ]Timer and String - by Canna - 15.12.2010, 00:25

Forum Jump:


Users browsing this thread: 1 Guest(s)