SA-MP Forums Archive
*** This topic title is not descriptive. - 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: *** This topic title is not descriptive. (/showthread.php?tid=390485)



I need help with login screen - Ryan_Michael - 06.11.2012

Okay, So I found this cool thing to add to my server (zGaming)
I need to know how to add it to login screen, It is on server but wont show

Script
Код:
new
	Text:MainMenu[4];

stock TextDraws_Init()
{
	/* Bottom Bar */
	MainMenu[0] = TextDrawCreate(250.000000, 343.000000, "~n~~n~~n~~n~~n~~n~");
	TextDrawAlignment(MainMenu[0], 2);
	TextDrawBackgroundColor(MainMenu[0], 255);
	TextDrawFont(MainMenu[0], 1);
	TextDrawLetterSize(MainMenu[0], 1.000000, 2.000000);
	TextDrawColor(MainMenu[0], -16776961);
	TextDrawSetOutline(MainMenu[0], 1);
	TextDrawSetProportional(MainMenu[0], 1);
	TextDrawUseBox(MainMenu[0], 1);
	TextDrawBoxColor(MainMenu[0], 255);
	TextDrawTextSize(MainMenu[0], 90.000000, 803.000000);

	/* Top Bar */
	MainMenu[1] = TextDrawCreate(250.000000, -12.000000, "~n~~n~~n~~n~~n~~n~");
	TextDrawAlignment(MainMenu[1], 2);
	TextDrawBackgroundColor(MainMenu[1], 255);
	TextDrawFont(MainMenu[1], 1);
	TextDrawLetterSize(MainMenu[1], 1.000000, 2.000000);
	TextDrawColor(MainMenu[1], -16776961);
	TextDrawSetOutline(MainMenu[1], 1);
	TextDrawSetProportional(MainMenu[1], 1);
	TextDrawUseBox(MainMenu[1], 1);
	TextDrawBoxColor(MainMenu[1], 255);
	TextDrawTextSize(MainMenu[1], 90.000000, 918.000000);

	/* Top Colored Bar */
	MainMenu[2] = TextDrawCreate(729.000000, 99.000000, "_");
	TextDrawBackgroundColor(MainMenu[2], 255);
	TextDrawFont(MainMenu[2], 1);
	TextDrawLetterSize(MainMenu[2], 50.000000, 0.099999);
	TextDrawColor(MainMenu[2], -16776961);
	TextDrawSetOutline(MainMenu[2], 0);
	TextDrawSetProportional(MainMenu[2], 1);
	TextDrawSetShadow(MainMenu[2], 1);
	TextDrawUseBox(MainMenu[2], 1);
	TextDrawBoxColor(MainMenu[2], 0x1564F5FF);
	TextDrawTextSize(MainMenu[2], -5.000000, 1031.000000);

	/* Bottom Colored Bar */
	MainMenu[3] = TextDrawCreate(729.000000, 340.000000, "_");
	TextDrawBackgroundColor(MainMenu[3], 255);
	TextDrawFont(MainMenu[3], 1);
	TextDrawLetterSize(MainMenu[3], 50.000000, 0.099999);
	TextDrawColor(MainMenu[3], -16776961);
	TextDrawSetOutline(MainMenu[3], 0);
	TextDrawSetProportional(MainMenu[3], 1);
	TextDrawSetShadow(MainMenu[3], 1);
	TextDrawUseBox(MainMenu[3], 1);
	TextDrawBoxColor(MainMenu[3], 0x1564F5FF);
	TextDrawTextSize(MainMenu[3], -5.000000, 1031.000000);
	return 1;
}

stock ToggleMainMenu(playerid, toggle)
{
	for(new i=0; i<sizeof(MainMenu); i++) {
		if(toggle) {
			TextDrawShowForPlayer(playerid, MainMenu[i]);
			TogglePlayerControllable(playerid, 0);
		}

		else {
			TextDrawHideForPlayer(playerid, MainMenu[i]);
			TogglePlayerControllable(playerid, 1);
		}
	}
	return 1;
}



Re: Need help adding this - Ryan_Michael - 06.11.2012

Fixed


Re: Need help adding this - Ryan_Michael - 06.11.2012

Never mind, Still need help


Re: *** This topic title is not descriptive. - Ryan_Michael - 06.11.2012

Anyone?


Re: *** This topic title is not descriptive. - bathushan - 06.11.2012

STOP MULTIPOSTING!!!
YOU CAN EDIT YOUR LAST POST!!!


\\\


Re: *** This topic title is not descriptive. - Emmet_ - 06.11.2012

Did you add

pawn Код:
TextDraws_Init();
under OnGameModeInit?


Re: *** This topic title is not descriptive. - Private200 - 06.11.2012

Do what emmet sia or just do it as a filterscript and add this , under OnPlayerConnect


Re: *** This topic title is not descriptive. - Ryan_Michael - 06.11.2012

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Did you add

pawn Код:
TextDraws_Init();
under OnGameModeInit?
I added this and did not work still


Re: *** This topic title is not descriptive. - fubar - 06.11.2012

Well i see where you got this from https://sampforum.blast.hk/showthread.php?tid=390428
so i would say use it like this
Код:
public OnPlayerConnect(playerid)
{
	ToggleMainMenu(playerid, 1);
	//blah
        //blah
       //blah and so on
    return 1;
}