tutorial scripting
#7

Quote:
Originally Posted by Mencent
Посмотреть сообщение
OK.

You can do it like this:
PHP код:
//when the tutorial starts:
//1st message
SendClientMessage(playerid,-1,"here the text");
SetTimerEx("OnPlayerInTutorial",10000,0,"ii",playerid,1);
//the callback for the timer:
forward OnPlayerInTutorial(playerid,step);
public 
OnPlayerInTutorial(playerid,step)
{
    switch(
step)
    {
        case 
1:
        {
            
//2nd message
            
SendClientMessage(playerid,-1,"here the text");
            
SetTimerEx("OnPlayerInTutorial",10000,0,"ii",playerid,2);
            return 
1;
        }
        case 
2:
        {
            
//3rd message
            
SendClientMessage(playerid,-1,"here the text");
            
SetTimerEx("OnPlayerInTutorial",10000,0,"ii",playerid,3);
            return 
1;
        }
        case 
4:
        {
            
//4th message
            
SendClientMessage(playerid,-1,"here the text");
            
SetTimerEx("OnPlayerInTutorial",10000,0,"ii",playerid,5);
            return 
1;
        }
        case 
5:
        {
            
//last tutorial step
            
SendClientMessage(playerid,-1,"here the text");
            
SetTimerEx("OnPlayerInTutorial",10000,0,"ii",playerid,5);
            return 
1;
        }
        case 
6:
        {
            
SendClientMessage(playerid,-1,"You're tutorial is finish.");
            
SpawnPlayer(playerid);
            return 
1;
        }
    }
    return 
1;

You can take SetPlayerCameraPos (+SetPlayerCameraLookAt) or InterpolateCameraPos (+InterpolateCameraLookAt).

SetPlayerCameraPos + SetPlayerCameraLookAt => the camera is on a fix point and show to a fix point
InterpolateCameraPos + InterpolateCameraLookAt => the camera move (you can fix the seconds how long the camera should move)

More information you can get in sa-mp wiki.
hey sorry for bumping, but where do I insert the code?
Reply


Messages In This Thread
tutorial scripting - by MrCesar - 15.10.2016, 08:54
Re: tutorial scripting - by Mencent - 15.10.2016, 09:17
Re: tutorial scripting - by MrCesar - 15.10.2016, 09:55
Re: tutorial scripting - by Mencent - 15.10.2016, 10:16
Re: tutorial scripting - by MrCesar - 15.10.2016, 11:04
Re: tutorial scripting - by Sew_Sumi - 15.10.2016, 12:05
Re: tutorial scripting - by MrCesar - 17.10.2016, 09:49
Re: tutorial scripting - by Gotham - 17.10.2016, 09:57

Forum Jump:


Users browsing this thread: 2 Guest(s)