Register Login delay
#1

I created short video with camera moving and texdraws etc..
but how to delay reg/log dialog to pop up?
Reply
#2

pawn Код:
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;
}
Reply
#3

Quote:
Originally Posted by [L3th4l]
Посмотреть сообщение
pawn Код:
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;
}
So basicly I have to count how much that "video" is long and put that time in timer?
Reply
#4

Yes.
Reply
#5

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 Код:
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;
}
Reply
#6

Quote:
Originally Posted by xRyder
Посмотреть сообщение
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 Код:
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;
}
I don't get some parts of it...
Can you take a look at raven's RP and explain it a bit further?

1st of all it doesn't set my camera where I want it, it remains the same..
2nd it doesn't even create any textdraws..


EDIT: I think I figured it out..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)