Ingame tutorial, but how?
#1

Hi!

I want the following!

When a player joins the first time, he has to WATCH a tutorial! The tutorial has got text under pictures are showing!
Pictures switch when the text is there, you know what I mean? He can skip the tutorial!

How to do something like this?
Reply
#2

You can set SetCameraLookAt then add textdraws.

PHP код:
     // Tutorial (Next Page)
    
TutTxtdraw[114] = TextDrawCreate(427.000000120.000000"Type ~r~/next");
    
TextDrawBackgroundColor(TutTxtdraw[114], 255);
    
TextDrawFont(TutTxtdraw[114], 2);
    
TextDrawLetterSize(TutTxtdraw[114], 0.1599980.899999);
    
TextDrawColor(TutTxtdraw[114], -1);
    
TextDrawSetOutline(TutTxtdraw[114], 1);
    
TextDrawSetProportional(TutTxtdraw[114], 1);
    
textdrawscount++; 
So they have to type /next to get a new "side"

These is from my own script.

PHP код:
CMD:next(playeridparams[])
{
    if(
InsideTut[playerid] < 1)
    {
        
SendClientMessageEx(playeridCOLOR_WHITE"You can't use the command outside the tutorial.");
        return 
1;
    }

    switch(
TutStep[playerid])
    {
        case 
1:
        {
            
HideTutGUIFrame(playerid1);
            
ShowTutGUIFrame(playerid2);
            
TutStep[playerid] = 2;

            
// Los Santos Bank (Camera)
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerInterior(playerid0);
            
Streamer_UpdateEx(playerid1457.4854,-1011.5267,26.8438);
            
SetPlayerPos(playerid1457.4854,-1011.5267,-10.0);
            
SetPlayerCameraPos(playerid1457.5421,-1039.4404,28.4274);
            
SetPlayerCameraLookAt(playerid1457.4854,-1011.5267,26.8438);
        }
        case 
2:
        {
            
ShowTutGUIFrame(playerid3);
            
TutStep[playerid] = 3;

            
// Los Santos ATM (Camera)
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerInterior(playerid0);
            
Streamer_UpdateEx(playerid2140.5173,-1163.9576,23.9922);
            
SetPlayerPos(playerid2140.5173,-1163.9576,-10.0);
            
SetPlayerCameraPos(playerid2145.8252,-1159.2659,27.7218);
            
SetPlayerCameraLookAt(playerid2140.5173,-1163.9576,23.9922);
        }
        case 
3:
        {
            
ShowTutGUIFrame(playerid4);
            
TutStep[playerid] = 4;

            
// Fishing Pier (Camera)
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerInterior(playerid0);
            
Streamer_UpdateEx(playerid370.0804,-2087.8767,7.8359);
            
SetPlayerPos(playerid370.0804,-2087.8767,-10.0);
            
SetPlayerCameraPos(playerid423.3802,-2067.7915,29.8605);
            
SetPlayerCameraLookAt(playerid370.0804,-2087.8767,7.8359);
        }
        case 
4:
        {
            
ShowTutGUIFrame(playerid5);
            
TutStep[playerid] = 5;

            
// Ganton Gym (Camera)
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerInterior(playerid0);
            
Streamer_UpdateEx(playerid2229.4968,-1722.0701,13.5625);
            
SetPlayerPos(playerid2229.4968,-1722.0701,-10.0);
            
SetPlayerCameraPos(playerid2211.1460,-1748.3909,29.3744);
            
SetPlayerCameraLookAt(playerid2229.4968,-1722.0701,13.5625);
        }
        case 
5:
        {
            
ShowTutGUIFrame(playerid6);
            
TutStep[playerid] = 6;

            
// Arms Dealer (Camera)
            
SetPlayerVirtualWorld(playerid0);
            
SetPlayerInterior(playerid0);
            
Streamer_UpdateEx(playerid1366.1187,-1275.1248,13.5469);
            
SetPlayerPos(playerid1366.1187,-1275.1248,-10.0);
            
SetPlayerCameraPos(playerid1341.2936,-1294.8105,23.3096);
            
SetPlayerCameraLookAt(playerid1366.1187,-1275.1248,13.5469);
        } 
Reply
#3

Ehm, I don't understand this really! Can you explain it in better steps?
Reply
#4

If you want a person to watch the tutorial the first time he joins, you can start by making textdraws. then he have to watch it.
Reply
#5

you can also make dialogs in "OnPlayerConnect" callback.. it will have two buttons "OK" "Next" blah blah and "OnDialogResponse" callback will have the rest of the code,,, hope you understand..
Reply
#6

Yeah, the problem is, how to make it when he joins the first time? THEN HE HAS TO WATCH IT!

And where to put this?

PHP код:
     // Tutorial (Next Page)
    
TutTxtdraw[114] = TextDrawCreate(427.000000120.000000"Type ~r~/next");
    
TextDrawBackgroundColor(TutTxtdraw[114], 255);
    
TextDrawFont(TutTxtdraw[114], 2);
    
TextDrawLetterSize(TutTxtdraw[114], 0.1599980.899999);
    
TextDrawColor(TutTxtdraw[114], -1);
    
TextDrawSetOutline(TutTxtdraw[114], 1);
    
TextDrawSetProportional(TutTxtdraw[114], 1);
    
textdrawscount++ 
Reply
#7

Watch ? Like a movie ?
Reply
#8

do you want it for the very first time only?
like the player visits your server for the first time he sees the tut..
then he will never see it again?
Reply
#9

Yes, for the very first time!

If he wants again, he can type CMD:tutorial
Reply
#10

make an enum "pTut"

add this in OnPlayerConnect

pawn Код:
if(PlayerInfo[playerid][pTut] = 0) {
//show the tut here and set the varieble to 1
PlayerInfo[playerid][pTut] == 1;
}
else if(PlayerInfo[playerid][pTut] == 1) {
//do nothing -,- or maybe dont add else
}
well not really sure..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)