13.03.2009, 11:17
I see. Well lemme add on to what I had before with a slight modding.(timer went from 4 seconds to 1 second).
This creates a variable which adds 1 every second until it hits 8. When 2 seconds go by, it will display the welcome message. When four seconds go by a second login message displays. When 8 seconds go by a third message displays.
Tell me if I got it right this time.
pawn Код:
new TimerTick[MAX_PLAYERS];
new secondtimer;
forward SecondTimer();
forward LoginMessage(playerid);
public OnGameModeInit()
{
secondtimer = SetTimer("SecondTimer", 1000, true);
return 1;
}
public OnPlayerConnect(playerid)
{
TimerTick[playerid] = 0;
return 1;
}
public SecondTimer()
{
for(new i=0; i<=GetMaxPlayers(); i++)
{
if(TimerTick[i] <= 8)
{
TimerTick[i]++;
LoginMessage(i);
}
}
return 1;
}
public LoginMessage(playerid)
{
if(TimerTick[playerid] == 2)
{
SendClientMessage(playerid, pgreen3, "Welcome to This Server.");
return 1;
}
if(TimerTick[playerid] == 4)
{
SendClientMessage(playerid, pgreen3, "Type /login [password] to login");
}
if(TimerTick[playerid] == 8)
{
SendClientMessage(playerid, pgreen3, "If you would like to reset your password type /resetpass [oldpass] [newpass]");
}
return 1;
}
Tell me if I got it right this time.

