Problem with the tutorial
#4

This is the codes,
When players press yes, They don't get forced into the tutorial.

forward Tut1(playerid); - It may be the code that will force you to the tutorial,
But nothing happens

Код:
forward Tut1(playerid);
public Tut1(playerid)
{
	SetPlayerInterior(playerid, 0);
	SetPlayerVirtualWorld(playerid, 94375);
    TogglePlayerControllable(playerid, 0);
    SetPlayerCameraPos( playerid, 1971.0290, -1779.7288, 77.8215 );
	SetPlayerCameraLookAt( playerid, 1963.4819, -1773.1683, 74.5658 );
    SetPlayerPos(playerid,1582.0026,-1274.0721,119.7132);
	SendClientMessage(playerid, COLOR_LIME, "_____| Evolution Roleplay Tutorial |_____");
	SendClientMessage(playerid, COLOR_WHITE, "Welcome to BRP, as this is your first time here you'll have to go through our tutorial");
	SendClientMessage(playerid, COLOR_WHITE, "so you get to know important things on our server.");
	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_RED, "Please concentrate because the tutorial will have lots of information about the gameplay.");
	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "");
	//SendClientMessage(playerid, COLOR_WHITE, "This server owned by RexerCloud, this Gamemode Script credits to Zhao/Calgon (HRP)");
	//SendClientMessage(playerid, COLOR_WHITE, "but all the New Changes of the Server Scripts scripted by the Owner(AkosiRaven)");
	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut2", 4000, false, "i", playerid);
	return 1;
}
forward Tut2(playerid);
public Tut2(playerid)
{
    InterpolateCameraPos(playerid, 1513.565429, -1615.603393, 35.681640, 1513.565429, -1615.603393, 35.681640, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1517.081054, -1618.825683, 34.179183, 1517.057495, -1618.851196, 34.179183, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,1506.6499,-1675.8396,41.2007);
	SetPlayerCameraLookAt(playerid, 1554.6344,-1675.5366,16.1953);
	SetPlayerPos(playerid,1554.6344,-1675.5366,16.1953-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 1 - Factions |_____");
    SendClientMessage(playerid, COLOR_WHITE, " At Evolution Roleplay we also have law enforcement agencies such as the LSPD and FBI, who enforce");
    SendClientMessage(playerid, COLOR_WHITE, " the law. They will arrest you if you break the law. If you cause a lot of trouble then");
    SendClientMessage(playerid, COLOR_WHITE, " you could be marked as one of the most wanted suspects. Which will mark you red");
    SendClientMessage(playerid, COLOR_WHITE, " on the radar/map. If you're caught as the most wanted suspect, then you will be");
    SendClientMessage(playerid, COLOR_WHITE, " sent to prison for 30 minutes. If you can't do the time, then don't do the crime..");
    SendClientMessage(playerid, COLOR_WHITE, " You can also join these factions by applying on our website, www.evolution-roleplay.com.");
	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut3", 12000, false, "i", playerid);
	return 1;
}
forward Tut3(playerid);
public Tut3(playerid)
{
    InterpolateCameraPos(playerid, 1993.177612, -1465.029296, 35.134315, 1993.177612, -1465.029296, 35.134315, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1995.919921, -1461.151611, 33.571128, 1996.122558, -1461.257812, 33.684108, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,1444.9666,-1709.8527,42.3163);
	SetPlayerCameraLookAt(playerid, 1483.7808,-1762.6996,18.7958);
	SetPlayerPos(playerid,1483.7808,-1762.6996,18.7958-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 2 - Hospitality |_____");
    SendClientMessage(playerid, COLOR_WHITE, " If you get injured then you can either /accept death or you can /service ems and wait");
    SendClientMessage(playerid, COLOR_WHITE, " for an ambulance of the LSFMD to arrive. This will allow you to keep your weapons.");
    SendClientMessage(playerid, COLOR_WHITE, " You can also join the LSFMD faction by applying on our website, www.evolution-roleplay.com");
    SendClientMessage(playerid, COLOR_WHITE, "");
    SendClientMessage(playerid, COLOR_WHITE, "");
    SendClientMessage(playerid, COLOR_WHITE, "You can also visit one of the hospitals to /heal if you get a disease.");
//	SendClientMessage(playerid, COLOR_WHITE, "");
//	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut4", 14000, false, "i", playerid);
	return 1;
}
forward Tut4(playerid);
public Tut4(playerid)
{
    InterpolateCameraPos(playerid, 2460.571289, -1653.040527, 25.918851, 2460.571289, -1653.040527, 25.918851, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 2465.023681, -1654.918701, 24.635215, 2465.023681, -1654.918701, 24.635215, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,2441.1738,-1698.3149,31.4247);
	SetPlayerCameraLookAt(playerid, 2507.3250,-1648.5522,13.8510);
	SetPlayerPos(playerid,2507.3250,-1648.5522,13.8510-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 3 - Gangs |_____");
    SendClientMessage(playerid, COLOR_WHITE, "(There are 10 gang slots in BRP)");
    SendClientMessage(playerid, COLOR_WHITE, "There are also /gangs which are basically criminal groups.");
    SendClientMessage(playerid, COLOR_WHITE, "We recommend that you're careful around them as they are meant to be dangerous.");
    SendClientMessage(playerid, COLOR_WHITE, "They also fight over several territories known as /points.");
    SendClientMessage(playerid, COLOR_WHITE, "You can join a gang by approaching them in-game. They can usually be found at their");
	SendClientMessage(playerid, COLOR_WHITE, "respective headquarters (fronts).");
	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut5", 14000, false, "i", playerid);
	return 1;
}
forward Tut5(playerid);
public Tut5(playerid)
{
    InterpolateCameraPos(playerid, 1946.401245, -1791.976074, 13.903589, 1946.401245, -1791.976074, 13.903589, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid,1943.074707, -1788.254150, 13.617287, 1943.074707, -1788.254150, 13.617287, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,1733.3695,2300.4736,28.1169);
	SetPlayerCameraLookAt(playerid, 1677.3669,2340.1497,9.8972);
	SetPlayerPos(playerid,1677.3669,2340.1497,9.8972-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 4 - Businesses |_____");
    SendClientMessage(playerid, COLOR_WHITE, "BRP has 4 different types of businesses.");
    SendClientMessage(playerid, COLOR_WHITE, "");
    SendClientMessage(playerid, COLOR_WHITE, "24/7 Market: Sells general things any player would need like Phones, Portable Radios, Vehicle Locks, etc.");
    SendClientMessage(playerid, COLOR_WHITE, "Clothes Shop: This is where you can change your skin, buy toys and more");
    SendClientMessage(playerid, COLOR_WHITE, "Ammunation: This shop you can buy weapons and armor for your protection");
	SendClientMessage(playerid, COLOR_WHITE, "Restaurant: You can get meals to recover health from Restaurant");
	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "To purchase items from a business use /buy.");
	Tut[playerid] = SetTimerEx("Tut6", 15000, false, "i", playerid);
	return 1;
}
forward Tut6(playerid);
public Tut6(playerid)
{
    InterpolateCameraPos(playerid, 2240.916503, -2635.225341, 25.850421, 2240.916503, -2635.225341, 25.850421, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 2237.417236, -2638.461425, 24.339271, 2237.417236, -2638.461425, 24.339271, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,979.7817,-1468.0079,41.3712);
	SetPlayerCameraLookAt(playerid, 1030.9037,-1441.5906,13.5546);
	SetPlayerPos(playerid,1030.9037,-1441.5906,13.5546-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 5 - Jobs |_____");
    SendClientMessage(playerid, COLOR_WHITE, "Here at BRP we have 12 different types of jobs.");
    SendClientMessage(playerid, COLOR_WHITE, "Each job has 5 different levels, every time you level up in a job it allows you to access more features.");
    SendClientMessage(playerid, COLOR_WHITE, "We recommend you try the drug smuggling job to earn some money, beware it is illegal and you may get busted by the Law Enforcement.");
    SendClientMessage(playerid, COLOR_WHITE, "To locate a job use /findjob.");
   	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "For more information regarding jobs please use /jobhelp.");
	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut7", 12000, false, "i", playerid);
	return 1;
}
forward Tut7(playerid);
public Tut7(playerid)
{
    InterpolateCameraPos(playerid, 513.857971, -1287.690795, 27.234487, 513.857971, -1287.690795, 27.234487, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 518.505981, -1286.368652, 25.950845, 518.505981, -1286.368652, 25.950845, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,1111.8488,-1202.7986,52.5143);
	SetPlayerCameraLookAt(playerid, 1153.9945,-1180.8960,32.8187);
	SetPlayerPos(playerid,1153.9945,-1180.8960,32.8187-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 6 - Car Dealership |_____");
    SendClientMessage(playerid, COLOR_WHITE, "This is a car dealership. There are several throughout the city where you can purchase");
	SendClientMessage(playerid, COLOR_WHITE, "your own personal vehicle. You can own up to 5 vehicles as a regular player");
	SendClientMessage(playerid, COLOR_WHITE, "and have one spawned at a time. The modifications on a personal vehicles will automatically be save.");
	SendClientMessage(playerid, COLOR_WHITE, "You may also purchase a car lock at any 24/7.");
	SendClientMessage(playerid, COLOR_WHITE, "For more information regarding the vehicle system please use /carhelp.");
 	SendClientMessage(playerid, COLOR_WHITE, "");
	SendClientMessage(playerid, COLOR_WHITE, "");
 	SendClientMessage(playerid, COLOR_WHITE, "");
	Tut[playerid] = SetTimerEx("Tut8", 12000, false, "i", playerid);
	return 1;
}
forward Tut8(playerid);
public Tut8(playerid)
{
    InterpolateCameraPos(playerid, 1646.381225, -1675.224243, 27.237483, 1646.381225, -1675.224243, 27.237483, 3000, CAMERA_MOVE);
    InterpolateCameraLookAt(playerid, 1648.188720, -1670.727783, 26.006774, 1648.188720, -1670.727783, 26.006774, 3000, CAMERA_MOVE);
	SetPlayerCameraPos(playerid,1111.8488,-1202.7986,52.5143);
	SetPlayerCameraLookAt(playerid, 1153.9945,-1180.8960,32.8187);
	SetPlayerPos(playerid,1153.9945,-1180.8960,32.8187-3);
    SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 8 - Donator VIP |_____");
    SendClientMessage(playerid, COLOR_WHITE, "Here at Evolution Roleplay, we have a very unique donator system,");
	SendClientMessage(playerid, COLOR_WHITE, "It consists of 3 different donator levels, Daisy, Rose and Ivy.");
	SendClientMessage(playerid, COLOR_WHITE, "Donators have access to special perks which normal people do not.");
	SendClientMessage(playerid, COLOR_WHITE, "These special perks are known to be very usefull, such as crafting a combat shotgun or even spawning up to 5 cars at once!");
	SendClientMessage(playerid, COLOR_WHITE, "We usaully give these perks in exchange of a price (server donations, contribution, and winning events)");
	SendClientMessage(playerid, COLOR_WHITE, "");
    SendClientMessage(playerid, COLOR_WHITE, "That is the end of tutorial, Thank you for taking your time and watching this.");
	Tut[playerid] = SetTimerEx("TutFinal", 11000, false, "i", playerid);
	return 1;
}
forward TutFinal(playerid);
public TutFinal(playerid)
{
    /*SendClientMessage(playerid, COLOR_LIME, "_____| Tutorial: Part 9 - The End |_____");
    SendClientMessage(playerid, COLOR_WHITE, "That was the end of our tutorial, If you have questions about anything feel free to");
	SendClientMessage(playerid, COLOR_WHITE, "ask over /newb chat,If you need an admininstrator help kindly use /report");
	SendClientMessage(playerid, COLOR_WHITE, "*Note* Never abuse /report or /newb this will lead you to ban");
	SendClientMessage(playerid, COLOR_WHITE, "");*/
	new string[128];
	format(string, sizeof(string), "Welcome to Evolution Roleplay, %s.", GetPlayerNameEx(playerid));
	SendClientMessage(playerid, COLOR_NEWS, string);

	//format(string, sizeof(string), "You haven been wired $10,000 in your bank account by the state as you are new.");
	//SendClientMessage(playerid, COLOR_LIGHTBLUE, string);

	format(string, sizeof(string), "~w~Welcome~n~~y~%s", GetPlayerNameEx(playerid));
	GameTextForPlayer(playerid, string, 5000, 1);

	new motdstring[128];
format(motdstring, sizeof(motdstring), "> {33CCFF}News: %s", GlobalMOTD);
	SendClientMessage(playerid, COLOR_YELLOW, motdstring);

	format(string, sizeof(string), "> {33CCFF} %s has just spawned on Evolution Roleplay for the first time!", GetPlayerNameEx(playerid));
	foreach(Player, i)
	{
	    if(PlayerInfo[i][pAdmin] >= 1 || PlayerInfo[i][pHelper] >= 1)
	    {
			SendClientMessageEx(i, COLOR_YELLOW, string);
		}
	}
	DeletePVar(playerid, "IsFrozen");
	SetPlayerInterior(playerid, 0);
	SetPlayerVirtualWorld(playerid, 0);
	SetPlayerPos(playerid, 1773.459350, -1942.273437, 13.569922);
	SetPlayerFacingAngle(playerid, 329.64);
	SetCameraBehindPlayer(playerid);
	InsideTut[playerid] = 0;
	DeletePVar(playerid, "MedicBill");
	SetPlayerColor(playerid,TEAM_HIT_COLOR);
	PlayerInfo[playerid][pTut] = 1;
	PlayerInfo[playerid][pLevel] = 1;
	PlayerInfo[playerid][pBank] = 10000;
	GivePlayerCash(playerid, 250);
	if(PlayerInfo[playerid][pSex] == 1) {
 		PlayerInfo[playerid][pSkin] = 299;
	} else {
   	PlayerInfo[playerid][pSkin] = 192;
    }
	SetPlayerSkin(playerid, 299);
	Refund(playerid);

	TogglePlayerControllable(playerid, true);
	return 1;
}
Here's the code of the buttons (YES/NO)

Код:
    ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}What is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
	    }
  	    else
  	    {
			//HideMainMenuGUI(playerid);
			//TogglePlayerControllable(playerid, true);
			//SetPVarInt(playerid, "IsFrozen", 1);

			//SetTimerEx("Tut1", 1000, false, "i", playerid);
			ShowPlayerDialogEx(playerid, WATCHTUT, DIALOG_STYLE_MSGBOX, "{00FF00}Evolution Roleplay - Tutorial", "Would you like to watch a small tutorial about the server basics?", "Yes", "No");
		}
	}
	else if(dialogid == REGISTRATION_MENU_FOUR)
  	{
        if(response) {
            if(IsNumeric(inputtext)) {
                ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}ENTRY DECLINED: The entry can't be a number.\n\nWhat is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
                return 1;
            }
            for(new i = 0; i < strlen(inputtext); i++) {
                if(inputtext[i] == ' ') {
                    ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}ENTRY DECLINED: Please use the '_'(underscore) instead of the ' '(space)\n\nWhat is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
                    return 1;
                }
            }
            if(strfind(inputtext, "_", true) == -1) {
                ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}ENTRY DECLINED: Please choose a name in the correct format: Firstname_Lastname.\n\nWhat is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
                return 1;
            }
            if(strlen(inputtext) > 20) {
                ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}ENTRY DECLINED: You can't select a name that's above 20 characters.\n\nWhat is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
                return 1;
            }
            if(!doesAccountExist(inputtext)) {
                ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FOUR, DIALOG_STYLE_INPUT, "{00FF00}Evolution Roleplay - Registration", "{FFFFFF}ENTRY DECLINED: There is no player registered by that name.\n\nWhat is the name of the player that referred you?\n\nNote: It must be the full player name with underscore ('_'). For example: John_Smith", "Done", "Cancel");
                return 1;
            }

            format(PlayerInfo[playerid][pReferredBy], MAX_PLAYER_NAME, "%s", inputtext);

            format(string, sizeof(string), "{FFFFFF}Are you sure you were referred by %s?", inputtext);
            ShowPlayerDialogEx(playerid, REGISTRATION_MENU_FIVE, DIALOG_STYLE_MSGBOX, "{00FF00}Evolution Roleplay - Registration", string, "Yes", "No");
        }
        else
        {
            strcpy(PlayerInfo[playerid][pReferredBy], "0", 32);
			//HideMainMenuGUI(playerid);
            //SetPVarInt(playerid, "IsFrozen", 1);
			//SetTimerEx("Tut1", 1000, false, "i", playerid);
			ShowPlayerDialogEx(playerid, WATCHTUT, DIALOG_STYLE_MSGBOX, "{00FF00}Evolution Roleplay - Tutorial", "Would you like to watch a small tutorial about the server basics?", "Yes", "No");
        }
  	}
  	else if(dialogid == REGISTRATION_MENU_FIVE)
  	{
   		if(response)
	    {
  			//HideMainMenuGUI(playerid);
            //SetPVarInt(playerid, "IsFrozen", 1);
			//SetTimerEx("Tut1", 1000, false, "i", playerid);
			ShowPlayerDialogEx(playerid, WATCHTUT, DIALOG_STYLE_MSGBOX, "{00FF00}Evolution Roleplay - Tutorial", "Would you like to watch a small tutorial about the server basics?", "Yes", "No");

	    }
I will appreciate any help.
Reply


Messages In This Thread
Problem with the tutorial - by darkhunter332 - 06.07.2016, 05:16
Re: Problem with the tutorial - by SickAttack - 06.07.2016, 05:59
Re: Problem with the tutorial - by Dayrion - 06.07.2016, 09:48
Re: Problem with the tutorial - by darkhunter332 - 06.07.2016, 13:38
Re: Problem with the tutorial - by gurmani11 - 06.07.2016, 14:11
Re: Problem with the tutorial - by darkhunter332 - 06.07.2016, 14:28
Re: Problem with the tutorial - by gurmani11 - 06.07.2016, 14:41
Re: Problem with the tutorial - by SickAttack - 06.07.2016, 15:14
Re: Problem with the tutorial - by darkhunter332 - 06.07.2016, 16:09

Forum Jump:


Users browsing this thread: 1 Guest(s)