SA-MP Forums Archive
Removing RP Test - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Removing RP Test (/showthread.php?tid=449744)



Removing RP Test - FShiwani - 10.07.2013

Hi,
I have recently used the LSL-RP script. I want to know how to get rid of the mandatory RP test in the beginning, I tried a couple of things but they failed.
Here is the dialog code

Код:
	else if(dialogid == TEST_DIALOG)
	{
	    if(!response)
	    {
			Kick(playerid);
	    }
	    if(!IsNumeric(inputtext))
        {
	    	ShowPlayerDialog(playerid, TEST_DIALOG, 1, "Birthdate", "Inputed value must be numeric, above 14 and bellow 80!\nType in how old do you want your character to be:", "Ok", "Quit");
            return 1;
        }
        new age = strval(inputtext);
        if(age < 14 || age > 80)
		{
	    	ShowPlayerDialog(playerid, TEST_DIALOG, 1, "Birthdate", "Inputed value must be numeric, above 14 and bellow 80!\nType in how old do you want your character to be:", "Ok", "Quit");
			return 1;
		}
		PlayerInfo[playerid][pAge] = age;
		ShowPlayerDialog(playerid, TEST_DIALOG+1, DIALOG_STYLE_LIST, "Please select your sex:", "Male\nFemale", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+1)
	{
	    if(!response)
		{
			Kick(playerid);
		}
	    PlayerInfo[playerid][pSex] = listitem+1;
	    SetPlayerSkinEx(playerid, 21);
	    PlayerInfo[playerid][pModel] = 21;
		ShowPlayerDialog(playerid, TEST_DIALOG+2, DIALOG_STYLE_LIST, "Please select where are you from:", "USA\nEurope\nAfrica\nAsia", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+2)
	{
		if(!response)
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+3, DIALOG_STYLE_LIST, "What is RP?", "1.Using OOC info IC.\n2.Killing people without a good reason.\n3.Stimulating the real life\n4.Jumping to get somewhere faster.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+3)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 2)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+4, DIALOG_STYLE_LIST, "What is DM?", "1.Car Surfing.\n2.Killing people without a good reason.\n3.Using IC info OOC\n4.Using keybinds.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+4)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 1)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+5, DIALOG_STYLE_LIST, "What is IC?", "1.Chat between players.\n2.Chat between player-controlled characters.\n3.Incorrect usage of chat.\n4.Using shortcuts in chat.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+5)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 1)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+6, DIALOG_STYLE_LIST, "What is OOC?", "1.Chat between player-controlled characters.\n2.Chat between players\n3.One of city centers.\n4.Using shortcuts in chat.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+6)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 1)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+7, DIALOG_STYLE_LIST, "What is a good example of /me?", "1./me shoots David and takes his money.\n2./me kills John.\n3./me and /you.\n4./me extends his right arm, attemping to give Ivan a gun./do s/f.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+7)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 3)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+8, DIALOG_STYLE_LIST, "What is the correct usage of /b (local ooc chat)?", "1./b Help! He will kidnap me.\n2./b Wanna buy some drugs?.\n3./b Where are you from IRL?\n4./b What's your phone number IC?", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+8)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 2)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+9, DIALOG_STYLE_LIST, "If you want to become a helper, what will you do?", "1.Contact server owner\n2.Ask any lead admin to add me as a helper.\n3.Apply on the forums if applications are open, if not ill wait.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+9)
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 2)//rigt one -1
		{
			Kick(playerid);
		}
		ShowPlayerDialog(playerid, TEST_DIALOG+10, DIALOG_STYLE_LIST, "What will you do if someone attacked you from behind with a gun?", "1.Run\n2.Insult him in OOC chat if i didn't do anything to him.\n3.Ask for help using /helpme.\n4.Use /me and /do commands to describe that i'm scared and do /handsup.", "Ok", "Quit");
	}
	else if(dialogid == TEST_DIALOG+10)//TEST_DIALOG+10 BEFORE
	{
		if(!response)
		{
			Kick(playerid);
		}
		if(listitem != 3)//rigt one -1
		{
			Kick(playerid);
		}
		ClearChatbox(playerid, 5);
	    RegistrationStep[playerid] = 0;
	    PlayerInfo[playerid][pTut] = 1;
	    SetTimerEx("Tutorial", 3000, false, "i", playerid);
		ShowPlayerDialog(playerid, MSG_DIALOG, 0, "Congratulations, you have sucessfully registered", "\nIf you need any help, use /helpme (ooc)\nIf you see a hacker, report him using /report\nWelcome to ShiwaniGaming Roleplay\nPlease register on our forums ", "Ok", "Quit");
	}
    return 0;
}



Re: Removing RP Test - BittleRyan - 10.07.2013

pawn Код:
RegistrationStep[playerid] = 0;
        PlayerInfo[playerid][pTut] = 1;
        SetTimerEx("Tutorial", 3000, false, "i", playerid);
        ShowPlayerDialog(playerid, MSG_DIALOG, 0, "Congratulations, you have sucessfully registered", "\nIf you need any help, use /helpme (ooc)\nIf you see a hacker, report him using /report\nWelcome to ShiwaniGaming Roleplay\nPlease register on our forums ", "Ok", "Quit");
The above is what moves you onto the tutorial after finishing the test. You need to find where it makes you start taking the RP test and comment out that section and put in what I have quoted above.


Re: Removing RP Test - FShiwani - 10.07.2013

There is this aswell

Код:
public SetPlayerRandomSpawn(playerid,type)
{
	new rand;
	new playername[32];
	new house = PlayerInfo[playerid][pHousekey];
	GetPlayerName(playerid, playername, sizeof(playername));
	SetPlayerSkillLevel(playerid,WEAPONSKILL_PISTOL,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_SAWNOFF_SHOTGUN,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_MICRO_UZI,200);
    SetPlayerSkillLevel(playerid,WEAPONSKILL_AK47,100);
    SetPlayerFightingStyle(playerid,PlayerInfo[playerid][pFightSkill]);
	if(PlayerInfo[playerid][pTut] == 0)
    {
		SetPlayerScore(playerid,1);
		PlayerInfo[playerid][pLevel] = 1;
        SetPlayerToTeamColor(playerid);
	    SetPlayerInterior(playerid, 6);
	    PlayerInfo[playerid][pInt] = 6;
	    SetPlayerPos(playerid, -2219.3479,133.8813,1035.6328);
	    SetPlayerFacingAngle(playerid, 280);
	    TogglePlayerControllable(playerid, 0);
	    RegistrationStep[playerid] = 1;
	    PlayerInfo[playerid][pAdmin] = 0;
	    if(PlayerInfo[playerid][pCalledTutSay]==0) {
	    SendClientMessage(playerid, COLOR_YELLOW, "Welcome to the Shiwani Gaming Roleplay. You will now be taken to the registration.");
	    SendClientMessage(playerid, COLOR_YELLOW, "Credits to Ivanorezac and Admantis for LSL-RP Script");
		SendClientMessage(playerid, COLOR_YELLOW, "ShiwaniGaming C.E.O FShiwani and C.E.O. Ali");
	    ShowPlayerDialog(playerid, TEST_DIALOG, 1, "Birthdate", "Type in how old do you want your character to be:", "Ok", "Quit");
	    //SendClientMessage(playerid, COLOR_LIGHTRED, "First question: Are you a Male or Female? (Type in what you are).");
   	    PlayerInfo[playerid][pCalledTutSay]=1; //lame
	    }
	    SetPlayerVirtualWorld(playerid,playerid);
	    return 1;
    }
I want the first two parts of the dialog though, the gender and age.


Re: Removing RP Test - FShiwani - 10.07.2013

Any ideas?