14.01.2011, 13:00
Quote:
pawn Код:
|
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;
}
In this case he was editing WelcomeMessage Textdraw, but he tried to show WelcomeMessageStage textdraw
DVDK's method is faster, because use of switch()