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.