14.01.2011, 12:59
pawn Код:
new PlayerTimer[MAX_PLAYERS];
new PlayerWelcomeMessageState[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, WelcomeMessage);
PlayerTimer[playerid] = SetTimerEx("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]);
TextDrawHideForPlayer(playerid, WelcomeMessage);
}
}
return 1;
}