TextdrawSetString?
#8

Quote:
Originally Posted by armyoftwo
Посмотреть сообщение
pawn Код:
new PlayerTimer[MAX_PLAYERS];
new PlayerWelcomeMessageState[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
    TextDrawShowForPlayer(playerid, WelcomeMessageStage);
    PlayerTimer[playerid] = SetTimer("ShowWelcomeMessage", 1000, true, "d", playerid);
    return 1;
}

public ShowWelcomeMessage(playerid)
{
    PlayerWelcomeMessageState[playerid] ++;
    switch(PlayerWelcomeMessageState[playerid])
    {
        case 1: TextDrawSetString(WelcomeMessage,"Welcome to!");
        case 2: TextDrawSetString(WelcomeMessage,"~g~K~w~Z~b~R");
        case 3: TextDrawSetString(WelcomeMessage,"~h~Welcome ~h~to!");
        case 4: TextDrawSetString(WelcomeMessage,"Kamikaze Racing");
        case 5: TextDrawSetString(WelcomeMessage,"~h~Kamikaz~h~e ~h~Racing");
        case 6:
        {
            KillTimer(PlayerTimer[playerid]);
            TextDrawShowForPlayer(playerid, WelcomeMessage);
        }

    }
    return 1;
}
The problem was that he was showing the wrong textdraw.
In this case he was editing WelcomeMessage Textdraw, but he tried to show WelcomeMessageStage textdraw
No, the problem was that SetTimer isn't returning any playerid.
And he didn't end the timer, and the state also wasn't including any playerid.
Reply


Messages In This Thread
TextdrawSetString? - by legho - 14.01.2011, 12:47
Re: TextdrawSetString? - by alpha500delta - 14.01.2011, 12:52
Re: TextdrawSetString? - by armyoftwo - 14.01.2011, 12:53
Re: TextdrawSetString? - by legho - 14.01.2011, 12:55
Re: TextdrawSetString? - by armyoftwo - 14.01.2011, 12:56
Re: TextdrawSetString? - by DVDK - 14.01.2011, 12:59
Re: TextdrawSetString? - by armyoftwo - 14.01.2011, 13:00
Re: TextdrawSetString? - by DVDK - 14.01.2011, 13:01
Re: TextdrawSetString? - by armyoftwo - 14.01.2011, 13:03

Forum Jump:


Users browsing this thread: 3 Guest(s)