Tutorial System issue with timer.
#8

Try this:
PHP код:
forward GuideTime(playerid);
public 
GuideTime(playerid)
{
    new 
string[128];
if(
TutStage[playerid] == 1)
            {
                 
SetPlayerCameraPos(playerid, -566.1818,1647.4830,156.1962);
                
SetPlayerCameraLookAt(playerid, -229.3934,1401.9023,73.0859);// general shot
                
format(stringsizeof(string), "Welcome to "COL_GREEN"Bone County Roleplay"COL_WHITE"! This short guide should help you get around a little easier.");
                
SendClientMessage(playeridCOLOUR_WHITEstring);
                
format(stringsizeof(string), "Thank you "COL_WHITE"for registering, we do hope you enjoy your stay.");
                
SendClientMessage(playeridCOLOUR_GREENstring);
                
format(stringsizeof(string), "Script:"COL_WHITE" This script is completely unique and scripted from scratch over a long period of time by a single developer.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
                 
format(stringsizeof(string), "Script:"COL_WHITE" It has never been released to the public and never will be, the script compromises of over 40,000 lines of code.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
                  
format(stringsizeof(string), "You may encounter bugs, if you do, please report them on the forums...Alright. "COL_GREEN"Let's begin.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
GuideTimer[playerid] = SetTimerEx("GuideTime"10000false"i"playerid);
                
TutStage[playerid] = 2;
            }
    if(
TutStage[playerid] == 2)
    {
         
SetPlayerCameraPos(playerid, -179.2579,1031.5060,24.0391);
        
SetPlayerCameraLookAt(playerid, -201.4486,1165.9543,19.7422);//fc main
          
format(stringsizeof(string), "Business System.");
        
SendClientMessage(playeridCOLOUR_BLUEstring);
          
format(stringsizeof(string), "Bone County is littered with businesses, all of which are enterable and have a variety of items.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
            
format(stringsizeof(string), "Business types include: "COL_ORANGE"Furniture Stores, General Stores, Gas Stations, Bars/Clubs, Pawn shops, Clothes stores etc.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
         
format(stringsizeof(string), "Businesses are available for purchase, of which there is no limit to the amount you can own. ");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
           
format(stringsizeof(string), "Tax is set by the government, currently the rate is (default) $150 per business, all optionally payable at the county hall.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
          
KillTimer(GuideTimer[playerid]);
        
GuideTimer[playerid] = SetTimerEx("GuideTime"10000false"i"playerid);
        
TutStage[playerid] = 3;
    }
     if(
TutStage[playerid] == 3)
    {
         
SetPlayerCameraPos(playerid, -32.6758,1108.7784,19.8135);
        
SetPlayerCameraLookAt(playerid,-19.0663,1115.3185,20.9399);//house view
          
format(stringsizeof(string), "House System.");
        
SendClientMessage(playeridCOLOUR_ORANGEstring);
          
format(stringsizeof(string), "Bone County has a wide range of houses available for purchase (or breaking into if that's your thing).");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
            
format(stringsizeof(string), "There is no limit to the amount of houses you own, but houses are taxed based upon their value. The amounts vary.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
         
format(stringsizeof(string), "As with everything else, you can sell your house to other players. Houses can also be broken into. Security is purchaseable.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
           
format(stringsizeof(string), "You cannot store items in houses per-se, but you can store items in furniture, just make sure your house is secure.");
        
SendClientMessage(playeridCOLOUR_WHITEstring);
        
KillTimer(GuideTimer[playerid]);
        
GuideTimer[playerid] = SetTimerEx("GuideTime"10000false"i"playerid);
          
TutStage[playerid] = 4;
    } 
To your other callback
PHP код:
TutStage[playerid] = 1;
GuideTimer[playerid] = SetTimerEx("GuideTime"10000false"i"playerid); 
EDIT: in case you dont want timer inside stage 1
Use inside stage 1
PHP код:
TutStage[playerid] = 1;
               if(
TutStage[playerid] == 1)
            {
                 
SetPlayerCameraPos(playerid, -566.1818,1647.4830,156.1962);
                
SetPlayerCameraLookAt(playerid, -229.3934,1401.9023,73.0859);// general shot
                
format(stringsizeof(string), "Welcome to "COL_GREEN"Bone County Roleplay"COL_WHITE"! This short guide should help you get around a little easier.");
                
SendClientMessage(playeridCOLOUR_WHITEstring);
                
format(stringsizeof(string), "Thank you "COL_WHITE"for registering, we do hope you enjoy your stay.");
                
SendClientMessage(playeridCOLOUR_GREENstring);
                
format(stringsizeof(string), "Script:"COL_WHITE" This script is completely unique and scripted from scratch over a long period of time by a single developer.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
                 
format(stringsizeof(string), "Script:"COL_WHITE" It has never been released to the public and never will be, the script compromises of over 40,000 lines of code.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
                  
format(stringsizeof(string), "You may encounter bugs, if you do, please report them on the forums...Alright. "COL_GREEN"Let's begin.");
                
SendClientMessage(playeridCOLOUR_GREYstring);
                
TutStage[playerid] = 2;
                                
GuideTime(playerid);
            }
            
GuideTimer[playerid] = SetTimerEx("GuideTime"10000false"i"playerid); 
Reply


Messages In This Thread
Tutorial System issue with timer. - by Dokins - 16.09.2016, 00:18
Re: Tutorial System issue with timer. - by vassilis - 16.09.2016, 00:33
Re: Tutorial System issue with timer. - by Dokins - 16.09.2016, 00:38
Re: Tutorial System issue with timer. - by vassilis - 16.09.2016, 00:40
Re: Tutorial System issue with timer. - by Dokins - 16.09.2016, 00:44
Re: Tutorial System issue with timer. - by vassilis - 16.09.2016, 00:47
Re: Tutorial System issue with timer. - by Dokins - 16.09.2016, 00:48
Re: Tutorial System issue with timer. - by vassilis - 16.09.2016, 00:54
Re: Tutorial System issue with timer. - by Dokins - 16.09.2016, 12:20
Re: Tutorial System issue with timer. - by vassilis - 16.09.2016, 12:24

Forum Jump:


Users browsing this thread: 6 Guest(s)