Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define FILTERSCRIPT
- //===================================================================//
- #include <a_samp>
- #include <zcmd>
- //=====================================================================//
- new Text:Textdraw0;
- new Text:Textdraw1;
- new Text:Textdraw2;
- new Text:Textdraw3;
- new Text:Textdraw4;
- new Text:Textdraw5;
- new Text:Textdraw6;
- new Text:Textdraw7;
- new Text:Textdraw8;
- new Text:Textdraw9;
- new Text:Textdraw10;
- new CurrentMsg = 0;
- //===================================================================//
- #define COLOR_RED 0xFF0000FF
- #define COLOR_GREEN 0x33FF33AA
- #pragma tabsize 0
- //====================================================================//
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n==============LOADING===============");
- print("--------------------------------------\n");
- print("Simple message box by V_LOPE loaded");
- print("--------------------------------------\n");
- print("\n==============LOAD-DONE===============");
- //======================================================//
- Textdraw0 = TextDrawCreate(423.000000, 439.000000, "-");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 1);
- TextDrawLetterSize(Textdraw0, 0.170000, 0.699998);
- TextDrawColor(Textdraw0, -1);
- TextDrawSetOutline(Textdraw0, 1);
- TextDrawSetProportional(Textdraw0, 1);
- TextDrawUseBox(Textdraw0, 1);
- TextDrawBoxColor(Textdraw0, 0x2C272755);
- TextDrawTextSize(Textdraw0, 651.000000, -60.000000);
- Textdraw1 = TextDrawCreate(423.000000, 432.000000, "-");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 1);
- TextDrawLetterSize(Textdraw1, 0.170000, 0.699998);
- TextDrawColor(Textdraw1, -1);
- TextDrawSetOutline(Textdraw1, 1);
- TextDrawSetProportional(Textdraw1, 1);
- TextDrawUseBox(Textdraw1, 1);
- TextDrawBoxColor(Textdraw1, 0x2C272755);
- TextDrawTextSize(Textdraw1, 651.000000, -60.000000);
- Textdraw2 = TextDrawCreate(423.000000, 425.000000, "-");
- TextDrawBackgroundColor(Textdraw2, 255);
- TextDrawFont(Textdraw2, 1);
- TextDrawLetterSize(Textdraw2, 0.170000, 0.699998);
- TextDrawColor(Textdraw2, -1);
- TextDrawSetOutline(Textdraw2, 1);
- TextDrawSetProportional(Textdraw2, 1);
- TextDrawUseBox(Textdraw2, 1);
- TextDrawBoxColor(Textdraw2, 0x2C272755);
- TextDrawTextSize(Textdraw2, 651.000000, -60.000000);
- Textdraw3 = TextDrawCreate(423.000000, 418.000000, "-");
- TextDrawBackgroundColor(Textdraw3, 255);
- TextDrawFont(Textdraw3, 1);
- TextDrawLetterSize(Textdraw3, 0.170000, 0.699998);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetOutline(Textdraw3, 1);
- TextDrawSetProportional(Textdraw3, 1);
- TextDrawUseBox(Textdraw3, 1);
- TextDrawBoxColor(Textdraw3, 0x2C272755);
- TextDrawTextSize(Textdraw3, 651.000000, -60.000000);
- Textdraw4 = TextDrawCreate(423.000000, 411.000000, "-");
- TextDrawBackgroundColor(Textdraw4, 255);
- TextDrawFont(Textdraw4, 1);
- TextDrawLetterSize(Textdraw4, 0.170000, 0.699998);
- TextDrawColor(Textdraw4, -1);
- TextDrawSetOutline(Textdraw4, 1);
- TextDrawSetProportional(Textdraw4, 1);
- TextDrawUseBox(Textdraw4, 1);
- TextDrawBoxColor(Textdraw4, 0x2C272755);
- TextDrawTextSize(Textdraw4, 651.000000, -60.000000);
- Textdraw5 = TextDrawCreate(423.000000, 404.000000, "-");
- TextDrawBackgroundColor(Textdraw5, 255);
- TextDrawFont(Textdraw5, 1);
- TextDrawLetterSize(Textdraw5, 0.170000, 0.699998);
- TextDrawColor(Textdraw5, -1);
- TextDrawSetOutline(Textdraw5, 1);
- TextDrawSetProportional(Textdraw5, 1);
- TextDrawUseBox(Textdraw5, 1);
- TextDrawBoxColor(Textdraw5, 0x2C272755);
- TextDrawTextSize(Textdraw5, 651.000000, -60.000000);
- Textdraw6 = TextDrawCreate(423.000000, 397.000000, "-");
- TextDrawBackgroundColor(Textdraw6, 255);
- TextDrawFont(Textdraw6, 1);
- TextDrawLetterSize(Textdraw6, 0.170000, 0.699998);
- TextDrawColor(Textdraw6, -1);
- TextDrawSetOutline(Textdraw6, 1);
- TextDrawSetProportional(Textdraw6, 1);
- TextDrawUseBox(Textdraw6, 1);
- TextDrawBoxColor(Textdraw6, 0x2C272755);
- TextDrawTextSize(Textdraw6, 651.000000, -60.000000);
- Textdraw7 = TextDrawCreate(423.000000, 390.000000, "-");
- TextDrawBackgroundColor(Textdraw7, 255);
- TextDrawFont(Textdraw7, 1);
- TextDrawLetterSize(Textdraw7, 0.170000, 0.699998);
- TextDrawColor(Textdraw7, -1);
- TextDrawSetOutline(Textdraw7, 1);
- TextDrawSetProportional(Textdraw7, 1);
- TextDrawUseBox(Textdraw7, 1);
- TextDrawBoxColor(Textdraw7, 0x2C272755);
- TextDrawTextSize(Textdraw7, 651.000000, -60.000000);
- Textdraw8 = TextDrawCreate(423.000000, 383.000000, "-");
- TextDrawBackgroundColor(Textdraw8, 255);
- TextDrawFont(Textdraw8, 1);
- TextDrawLetterSize(Textdraw8, 0.170000, 0.699998);
- TextDrawColor(Textdraw8, -1);
- TextDrawSetOutline(Textdraw8, 1);
- TextDrawSetProportional(Textdraw8, 1);
- TextDrawUseBox(Textdraw8, 1);
- TextDrawBoxColor(Textdraw8, 0x2C272755);
- TextDrawTextSize(Textdraw8, 651.000000, -60.000000);
- Textdraw9 = TextDrawCreate(423.000000, 376.000000, "-");
- TextDrawBackgroundColor(Textdraw9, 255);
- TextDrawFont(Textdraw9, 1);
- TextDrawLetterSize(Textdraw9, 0.170000, 0.699998);
- TextDrawColor(Textdraw9, -1);
- TextDrawSetOutline(Textdraw9, 1);
- TextDrawSetProportional(Textdraw9, 1);
- TextDrawUseBox(Textdraw9, 1);
- TextDrawBoxColor(Textdraw9, 0x2C272755);
- TextDrawTextSize(Textdraw9, 651.000000, -60.000000);
- Textdraw10 = TextDrawCreate(423.000000, 369.000000, "-");
- TextDrawBackgroundColor(Textdraw10, 255);
- TextDrawFont(Textdraw10, 1);
- TextDrawLetterSize(Textdraw10, 0.170000, 0.699998);
- TextDrawColor(Textdraw10, -1);
- TextDrawSetOutline(Textdraw10, 1);
- TextDrawSetProportional(Textdraw10, 1);
- TextDrawUseBox(Textdraw10, 1);
- TextDrawBoxColor(Textdraw10, 0x2C272755);
- TextDrawTextSize(Textdraw10, 651.000000, -60.000000);
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawDestroy(Textdraw0);
- TextDrawDestroy(Textdraw1);
- TextDrawDestroy(Textdraw2);
- TextDrawDestroy(Textdraw3);
- TextDrawDestroy(Textdraw4);
- TextDrawDestroy(Textdraw5);
- TextDrawDestroy(Textdraw6);
- TextDrawDestroy(Textdraw7);
- TextDrawDestroy(Textdraw8);
- TextDrawDestroy(Textdraw9);
- TextDrawDestroy(Textdraw10);
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnGameModeInit()
- {
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new name[24],string[128];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof string,"%s has ~g~joined ~w~the server",name);
- SendBoxMsg(string);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new name[24]; GetPlayerName(playerid,name,sizeof(name));
- new string[128];
- switch(reason)
- {
- case 0: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Timed out)",name);
- case 1: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Leaving)",name);
- case 2: format(string,sizeof string,"%s has ~r~left ~w~the server. ~r~(Kicked/Banned)",name);
- }
- SendBoxMsg(string);
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new name[24],kname[24],string[128];
- GetPlayerName(playerid,name,sizeof(name)); GetPlayerName(killerid,kname,sizeof(kname));
- format(string,sizeof string,"%s has ~r~killed ~w~%s",kname,name);
- SendBoxMsg(string);
- return 1;
- }
- CMD:clearbox(playerid)
- {
- if(IsPlayerAdmin(playerid))
- {
- TextDrawShowForAll(Textdraw0);
- TextDrawShowForAll(Textdraw1);
- TextDrawShowForAll(Textdraw2);
- TextDrawShowForAll(Textdraw3);
- TextDrawShowForAll(Textdraw4);
- TextDrawShowForAll(Textdraw5);
- TextDrawShowForAll(Textdraw6);
- TextDrawShowForAll(Textdraw7);
- TextDrawShowForAll(Textdraw8);
- TextDrawShowForAll(Textdraw9);
- TextDrawShowForAll(Textdraw10);
- TextDrawSetString(Textdraw0,"-");
- TextDrawSetString(Textdraw1,"-");
- TextDrawSetString(Textdraw2,"-");
- TextDrawSetString(Textdraw3,"-");
- TextDrawSetString(Textdraw4,"-");
- TextDrawSetString(Textdraw5,"-");
- TextDrawSetString(Textdraw6,"-");
- TextDrawSetString(Textdraw7,"-");
- TextDrawSetString(Textdraw8,"-");
- TextDrawSetString(Textdraw9,"-");
- TextDrawSetString(Textdraw10,"-");
- CurrentMsg = 0;
- } else return SendClientMessage(playerid,COLOR_RED,"Only RCONS admins can use this cmd");
- return 1;
- }
- CMD:boxchat(playerid,params[])
- {
- if(isnull(params)) return SendClientMessage(playerid,COLOR_RED,"Current Usage: /boxchat [text]");
- SendClientMessage(playerid,COLOR_GREEN,"Message Sended!");
- new string[128],name[24];
- GetPlayerName(playerid,name,sizeof(name));
- format(string,sizeof(string),"%s[%i]: %s",name,playerid,params);
- SendBoxMsg(string);
- return 1;
- }
- stock SendBoxMsg(string[])
- {
- if(CurrentMsg == 0)
- {
- TextDrawShowForAll(Textdraw0);
- TextDrawSetString(Textdraw0,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 1)
- {
- TextDrawShowForAll(Textdraw1);
- TextDrawSetString(Textdraw1,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 2)
- {
- TextDrawShowForAll(Textdraw2);
- TextDrawSetString(Textdraw2,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 3)
- {
- TextDrawShowForAll(Textdraw3);
- TextDrawSetString(Textdraw3,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 4)
- {
- TextDrawShowForAll(Textdraw4);
- TextDrawSetString(Textdraw4,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 5)
- {
- TextDrawShowForAll(Textdraw5);
- TextDrawSetString(Textdraw5,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 6)
- {
- TextDrawShowForAll(Textdraw6);
- TextDrawSetString(Textdraw6,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 7)
- {
- TextDrawShowForAll(Textdraw7);
- TextDrawSetString(Textdraw7,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 8)
- {
- TextDrawShowForAll(Textdraw8);
- TextDrawSetString(Textdraw8,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 9)
- {
- TextDrawShowForAll(Textdraw9);
- TextDrawSetString(Textdraw9,string);
- CurrentMsg++;
- }
- else if(CurrentMsg == 10)
- {
- TextDrawShowForAll(Textdraw10);
- TextDrawSetString(Textdraw10,string);
- CurrentMsg++;
- }
- else if(CurrentMsg >= 12)
- {
- CurrentMsg = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment