27.06.2012, 07:21
Example:
Hope I helped.
pawn Код:
new TourVariable[MAX_PLAYERS];
forward TourTimer(playerid);
new TourTimerVariable[MAX_PLAYERS];
OnPlayerConnect(playerid)
{
TourVariable[playerid] = 0;
return 1;
}
CMD:tour(playerid, params[])
{
if(IsPlayerConnected(playerid))
{
TourTimerVariable[playerid] = SetTimerEx("message", 5000, false, "i", playerid);
SendClientMessage(playerid, -1, "You are now going through the tour!");
}
return 1;
}
public message(playerid)
{
if(TourVariable[playerid] == 0)
{
TourVariable[playerid] = 1;
//First thing
}
if(TourVariable[playerid] == 1)
{
TourVariable[playerid] = 2;
//Second thing
}
if(TourVariable[playerid] == 2)
{
TourVariable[playerid] = 3;
//Third thing
}
if(TourVariable[playerid] == 3)
{
TourVariable[playerid] = 4;
//Fourth thing
}
if(TourVariable[playerid] == 4)
{
//Fifth thing
TourVariable[playerid] = 0;
KillTimer(TourTimerVariable[playerid]);
}
return 1;
}