20.02.2011, 00:00
I created short video with camera moving and texdraws etc..
but how to delay reg/log dialog to pop up?
but how to delay reg/log dialog to pop up?
public OnPlayerConnect(playerid)
{
SetTimerEx("LogReg", 6000, false, "d", playerid); // A Timer for that player, 6 seconds.
return 1;
}
forward LogReg(playerid);
public LogReg(playerid)
{
// Show log or register info
return 1;
}
new PlayerStep[MAX_PLAYERS] = 0;
public OnPlayerConnect(playerid)
{
//Set him spectating here.
//Set his camera where you want.
//Make new function where you will send him here( In my case i'll use ShowVideo).
ShowVideo(playerid);
PlayerStep[playerid] = 1;
//Some more code if you want...
return 1;
}
forward ShowVideo(playerid);
public ShowVideo(playerid)
{
if(PlayerStep[playerid] == 1)
{
// Do this ( your code here)
PlayerStep[playerid] = 2;
ShowVideo(playerid);
}
else if(PlayerStep[playerid] == 2)
{
//Do something else
PlayerStep[playerid] = 3;
ShowVideo(playerid);
}
//And you continue like this till some number that will be your last number. ( My case is 8)
else if(PlayerStep[playerid] == 8)
{
PlayerStep[playerid] = 0;
ShowPlayerDialog();
}
return 1;
}
Well not really. This will never give you right time, and that can vary a lot (from player to player).
What you can do is like making player variable. Something like: ( this will be really simple just to show you how you can do it.) pawn Код:
|