Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- /* Includes */
- #include <a_samp>
- #define MAX_WELCOME_TDRAW 13 //Max textdraws created.
- forward HideWelcome(playerid);
- /* Textdraws Define */
- new PlayerText:WELCOME_TEXT[MAX_WELCOME_TDRAW];
- public HideWelcome(playerid)
- {
- for(new x; x<MAX_WELCOME_TDRAW; x++)
- {
- PlayerTextDrawDestroy(playerid, WELCOME_TEXT[x]);
- }
- return 1;
- }
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Cool OnPlayerConnect TextDraws by BulletRaja");
- print("--------------------------------------\n");
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- for(new x; x<MAX_WELCOME_TDRAW; x++)
- {
- PlayerTextDrawShow(playerid, WELCOME_TEXT[x]);
- }
- new hostname[25], language[25], mapname[25], gamemodetext[25];
- GetServerVarAsString("hostname", hostname, sizeof (hostname));
- GetServerVarAsString("language", language, sizeof (language));
- GetServerVarAsString("mapname", mapname, sizeof (mapname));
- GetServerVarAsString("gamemodetext", gamemodetext, sizeof (gamemodetext));
- new pname[MAX_PLAYER_NAME], string[60];
- GetPlayerName(playerid, pname, sizeof(pname));
- format(string, 144, "[] Server Name: %s", hostname);
- PlayerTextDrawSetString(playerid, WELCOME_TEXT[5], string);//Textdraw 5
- format(string, 144, "[] Server Language: %s", language);
- PlayerTextDrawSetString(playerid, WELCOME_TEXT[6], string);//Textdraw 6
- format(string, 144, "[] Server Gamemode: %s", gamemodetext);
- PlayerTextDrawSetString(playerid, WELCOME_TEXT[7], string);//Textdraw 7
- format(string, 144, "[] Server Map: %s", mapname);
- PlayerTextDrawSetString(playerid, WELCOME_TEXT[8], string);//Textdraw 8
- format(string, 144, "~p~[] ~b~Name: %s", pname);
- PlayerTextDrawSetString(playerid, WELCOME_TEXT[11], string);//Textdraw 11
- SetTimerEx("HideWelcome", 5000, false, "i", playerid);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- //Create the textdraw.
- WELCOME_TEXT[0] = CreatePlayerTextDraw(playerid, 1.859470, 2.166683, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[0], 0.000000, 9.812591);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[0], 687.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[0], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[0], 150);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[0], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[0], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[0], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[0], 1);
- WELCOME_TEXT[1] = CreatePlayerTextDraw(playerid, -0.014688, 358.000091, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[1], 0.000000, 9.718887);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[1], 639.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[1], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[1], 150);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[1], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[1], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[1], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[1], 1);
- WELCOME_TEXT[2] = CreatePlayerTextDraw(playerid, 1.859453, 95.500000, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[2], 0.000000, -0.822838);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[2], 671.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[2], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[2], -16776961);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[2], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[2], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[2], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[2], 1);
- WELCOME_TEXT[3] = CreatePlayerTextDraw(playerid, 2.796497, 358.000030, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[3], 0.000000, -0.822838);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[3], 672.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[3], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[3], -16776961);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[3], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[3], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[3], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[3], 1);
- WELCOME_TEXT[4] = CreatePlayerTextDraw(playerid, 261.420227, 355.666595, "Server Information");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[4], 0.596310, 1.955833);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[4], 767.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[4], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[4], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[4], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[4], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[4], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[4], 1);
- WELCOME_TEXT[5] = CreatePlayerTextDraw(playerid, 47.306015, 376.083282, "");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[5], 0.596310, 1.955833);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[5], 767.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[5], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[5], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[5], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[5], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[5], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[5], 1);
- WELCOME_TEXT[6] = CreatePlayerTextDraw(playerid, 47.306015, 394.166625, "");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[6], 0.596310, 1.955833);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[6], 767.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[6], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[6], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[6], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[6], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[6], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[6], 1);
- WELCOME_TEXT[7] = CreatePlayerTextDraw(playerid, 47.306015, 412.833312, "");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[7], 0.596310, 1.955833);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[7], 767.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[7], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[7], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[7], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[7], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[7], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[7], 1);
- WELCOME_TEXT[8] = CreatePlayerTextDraw(playerid, 47.306015, 430.333312, "");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[8], 0.596310, 1.955833);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[8], 767.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[8], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[8], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[8], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[8], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[8], 0), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[8], 1);
- WELCOME_TEXT[9] = CreatePlayerTextDraw(playerid, 264.230957, 379.583343, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[9], 0.000000, -0.775987);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[9], 390.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[9], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[9], -930873089);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[9], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[9], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[9], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[9], 1);
- WELCOME_TEXT[10] = CreatePlayerTextDraw(playerid, 274.070495, 10.916663, "~g~~h~Welcome ~y~~h~Back");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[10], 0.458565, 3.145834);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[10], 544.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[10], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[10], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[10], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[10], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[10], 2), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[10], 1);
- WELCOME_TEXT[11] = CreatePlayerTextDraw(playerid, 243.616561, 58.750007, "");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[11], 0.456691, 1.845001);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[11], 544.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[11], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[11], -1);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[11], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[11], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[11], 2), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[11], 1);
- WELCOME_TEXT[12] = CreatePlayerTextDraw(playerid, 278.755065, 41.250061, "box");
- PlayerTextDrawLetterSize(playerid, WELCOME_TEXT[12], 0.000000, -0.775987);
- PlayerTextDrawTextSize(playerid, WELCOME_TEXT[12], 415.000000, 0.000000);
- PlayerTextDrawAlignment(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawColor(playerid, WELCOME_TEXT[12], -1);
- PlayerTextDrawUseBox(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawBoxColor(playerid, WELCOME_TEXT[12], -930873089);
- PlayerTextDrawSetShadow(playerid, WELCOME_TEXT[12], 0), PlayerTextDrawBackgroundColor(playerid, WELCOME_TEXT[12], 255);
- PlayerTextDrawFont(playerid, WELCOME_TEXT[12], 1), PlayerTextDrawSetProportional(playerid, WELCOME_TEXT[12], 1);
- return 1;
- }
Add Comment
Please, Sign In to add comment