Ingame tutorial, but how? -
samtey - 13.08.2011
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?
Re: Ingame tutorial, but how? -
Meinstad - 13.08.2011
You can set SetCameraLookAt then add textdraws.
PHP код:
// Tutorial (Next Page)
TutTxtdraw[114] = TextDrawCreate(427.000000, 120.000000, "Type ~r~/next");
TextDrawBackgroundColor(TutTxtdraw[114], 255);
TextDrawFont(TutTxtdraw[114], 2);
TextDrawLetterSize(TutTxtdraw[114], 0.159998, 0.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(playerid, params[])
{
if(InsideTut[playerid] < 1)
{
SendClientMessageEx(playerid, COLOR_WHITE, "You can't use the command outside the tutorial.");
return 1;
}
switch(TutStep[playerid])
{
case 1:
{
HideTutGUIFrame(playerid, 1);
ShowTutGUIFrame(playerid, 2);
TutStep[playerid] = 2;
// Los Santos Bank (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 1457.4854,-1011.5267,26.8438);
SetPlayerPos(playerid, 1457.4854,-1011.5267,-10.0);
SetPlayerCameraPos(playerid, 1457.5421,-1039.4404,28.4274);
SetPlayerCameraLookAt(playerid, 1457.4854,-1011.5267,26.8438);
}
case 2:
{
ShowTutGUIFrame(playerid, 3);
TutStep[playerid] = 3;
// Los Santos ATM (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2140.5173,-1163.9576,23.9922);
SetPlayerPos(playerid, 2140.5173,-1163.9576,-10.0);
SetPlayerCameraPos(playerid, 2145.8252,-1159.2659,27.7218);
SetPlayerCameraLookAt(playerid, 2140.5173,-1163.9576,23.9922);
}
case 3:
{
ShowTutGUIFrame(playerid, 4);
TutStep[playerid] = 4;
// Fishing Pier (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 370.0804,-2087.8767,7.8359);
SetPlayerPos(playerid, 370.0804,-2087.8767,-10.0);
SetPlayerCameraPos(playerid, 423.3802,-2067.7915,29.8605);
SetPlayerCameraLookAt(playerid, 370.0804,-2087.8767,7.8359);
}
case 4:
{
ShowTutGUIFrame(playerid, 5);
TutStep[playerid] = 5;
// Ganton Gym (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 2229.4968,-1722.0701,13.5625);
SetPlayerPos(playerid, 2229.4968,-1722.0701,-10.0);
SetPlayerCameraPos(playerid, 2211.1460,-1748.3909,29.3744);
SetPlayerCameraLookAt(playerid, 2229.4968,-1722.0701,13.5625);
}
case 5:
{
ShowTutGUIFrame(playerid, 6);
TutStep[playerid] = 6;
// Arms Dealer (Camera)
SetPlayerVirtualWorld(playerid, 0);
SetPlayerInterior(playerid, 0);
Streamer_UpdateEx(playerid, 1366.1187,-1275.1248,13.5469);
SetPlayerPos(playerid, 1366.1187,-1275.1248,-10.0);
SetPlayerCameraPos(playerid, 1341.2936,-1294.8105,23.3096);
SetPlayerCameraLookAt(playerid, 1366.1187,-1275.1248,13.5469);
}
AW: Ingame tutorial, but how? -
samtey - 13.08.2011
Ehm, I don't understand this really! Can you explain it in better steps?
Re: Ingame tutorial, but how? -
Meinstad - 13.08.2011
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.
Re: Ingame tutorial, but how? -
emokidx - 13.08.2011
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..
AW: Ingame tutorial, but how? -
samtey - 13.08.2011
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.000000, 120.000000, "Type ~r~/next");
TextDrawBackgroundColor(TutTxtdraw[114], 255);
TextDrawFont(TutTxtdraw[114], 2);
TextDrawLetterSize(TutTxtdraw[114], 0.159998, 0.899999);
TextDrawColor(TutTxtdraw[114], -1);
TextDrawSetOutline(TutTxtdraw[114], 1);
TextDrawSetProportional(TutTxtdraw[114], 1);
textdrawscount++
Re: Ingame tutorial, but how? -
Meinstad - 13.08.2011
Watch ? Like a movie ?
Re: Ingame tutorial, but how? -
emokidx - 13.08.2011
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?
AW: Ingame tutorial, but how? -
samtey - 13.08.2011
Yes, for the very first time!
If he wants again, he can type CMD:tutorial
Re: Ingame tutorial, but how? -
emokidx - 13.08.2011
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..