Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
- * *
- * [FS] Spielerverbingungsinfo v2.0 *
- * *
- * © 2011, Script by 4#Future *
- * *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
- // ------------
- // - Includes -
- // ------------
- #include <a_samp>
- // -----------
- // - Defines -
- // -----------
- #define TIME_to_HIDE 8000 // Zeit bis die Info wieder ausgeblendet wird, in Millisekunden (Standard: 8s)
- new Text:TdHeadline, Text:TdHGinfo, Text:TdSpielerName, Text:TdNachricht, Text:TdTrennung, Text:TdSpielerIP, Text:TdSpielerPing;
- new Text:DiscHeadline, Text:DiscHGinfo, Text:DiscSpielerName, Text:DiscNachricht;
- forward ShowConInfo();
- forward HideConInfo();
- forward ShowDiscInfo();
- forward HideDiscInfo();
- // --------------
- // - Funktionen -
- // --------------
- public OnFilterScriptInit()
- {
- print(" ");
- print("[FILTERSCRIPT] Spielerverbindungsinfo v2.0, by 4#Future");
- print(" ");
- return 1;
- }
- public OnGameModeInit()
- {
- // -- Textdraws --
- TdHeadline = TextDrawCreate(473.000000, 363.000000, "Verbindungsinfo...");
- TextDrawBackgroundColor(TdHeadline, 255);
- TextDrawFont(TdHeadline, 2);
- TextDrawLetterSize(TdHeadline, 0.289999, 1.399999);
- TextDrawColor(TdHeadline, -65281);
- TextDrawSetOutline(TdHeadline, 0);
- TextDrawSetProportional(TdHeadline, 1);
- TextDrawSetShadow(TdHeadline, 1);
- TextDrawUseBox(TdHeadline, 1);
- TextDrawBoxColor(TdHeadline, 150);
- TextDrawTextSize(TdHeadline, 639.000000, 0.000000);
- TdHGinfo = TextDrawCreate(473.000000, 379.000000, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~");
- TextDrawBackgroundColor(TdHGinfo, 255);
- TextDrawFont(TdHGinfo, 1);
- TextDrawLetterSize(TdHGinfo, 0.500000, 1.000000);
- TextDrawColor(TdHGinfo, -1);
- TextDrawSetOutline(TdHGinfo, 0);
- TextDrawSetProportional(TdHGinfo, 1);
- TextDrawSetShadow(TdHGinfo, 1);
- TextDrawUseBox(TdHGinfo, 1);
- TextDrawBoxColor(TdHGinfo, 84215140);
- TextDrawTextSize(TdHGinfo, 700.000000, 130.000000);
- TdSpielerName = TextDrawCreate(475.000000, 382.000000, "wird geladen...");
- TextDrawBackgroundColor(TdSpielerName, 255);
- TextDrawFont(TdSpielerName, 2);
- TextDrawLetterSize(TdSpielerName, 0.270000, 1.200000);
- TextDrawColor(TdSpielerName, -1);
- TextDrawSetOutline(TdSpielerName, 0);
- TextDrawSetProportional(TdSpielerName, 1);
- TextDrawSetShadow(TdSpielerName, 1);
- TdNachricht = TextDrawCreate(475.000000, 396.000000, "wird geladen...");
- TextDrawBackgroundColor(TdNachricht, 255);
- TextDrawFont(TdNachricht, 2);
- TextDrawLetterSize(TdNachricht, 0.270000, 1.200000);
- TextDrawColor(TdNachricht, -1);
- TextDrawSetOutline(TdNachricht, 0);
- TextDrawSetProportional(TdNachricht, 1);
- TextDrawSetShadow(TdNachricht, 1);
- TdTrennung = TextDrawCreate(473.000000, 414.000000, "-");
- TextDrawBackgroundColor(TdTrennung, 255);
- TextDrawFont(TdTrennung, 1);
- TextDrawLetterSize(TdTrennung, 0.000000, -0.199997);
- TextDrawColor(TdTrennung, -1);
- TextDrawSetOutline(TdTrennung, 0);
- TextDrawSetProportional(TdTrennung, 1);
- TextDrawSetShadow(TdTrennung, 1);
- TextDrawUseBox(TdTrennung, 1);
- TextDrawBoxColor(TdTrennung, 336860385);
- TextDrawTextSize(TdTrennung, 700.000000, 0.000000);
- TdSpielerIP = TextDrawCreate(475.000000, 418.000000, "wird geladen...");
- TextDrawBackgroundColor(TdSpielerIP, 255);
- TextDrawFont(TdSpielerIP, 2);
- TextDrawLetterSize(TdSpielerIP, 0.270000, 1.200000);
- TextDrawColor(TdSpielerIP, -1);
- TextDrawSetOutline(TdSpielerIP, 0);
- TextDrawSetProportional(TdSpielerIP, 1);
- TextDrawSetShadow(TdSpielerIP, 1);
- TdSpielerPing = TextDrawCreate(475.000000, 431.000000, "wird geladen...");
- TextDrawBackgroundColor(TdSpielerPing, 255);
- TextDrawFont(TdSpielerPing, 2);
- TextDrawLetterSize(TdSpielerPing, 0.270000, 1.200000);
- TextDrawColor(TdSpielerPing, -1);
- TextDrawSetOutline(TdSpielerPing, 0);
- TextDrawSetProportional(TdSpielerPing, 1);
- TextDrawSetShadow(TdSpielerPing, 1);
- //--------------------------------------------------------------------------
- DiscHeadline = TextDrawCreate(491.000000, 394.000000, "Verbindungsinfo...");
- TextDrawBackgroundColor(TdHeadline, 255);
- TextDrawFont(TdHeadline, 2);
- TextDrawLetterSize(TdHeadline, 0.300000, 1.500000);
- TextDrawColor(TdHeadline, -65281);
- TextDrawSetOutline(TdHeadline, 0);
- TextDrawSetProportional(TdHeadline, 1);
- TextDrawSetShadow(TdHeadline, 1);
- TextDrawUseBox(TdHeadline, 1);
- TextDrawBoxColor(TdHeadline, 150);
- TextDrawTextSize(TdHeadline, 639.000000, 0.000000);
- DiscHGinfo = TextDrawCreate(491.000000, 411.000000, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~");
- TextDrawBackgroundColor(TdHGinfo, 255);
- TextDrawFont(TdHGinfo, 1);
- TextDrawLetterSize(TdHGinfo, 0.500000, 1.000000);
- TextDrawColor(TdHGinfo, -1);
- TextDrawSetOutline(TdHGinfo, 0);
- TextDrawSetProportional(TdHGinfo, 1);
- TextDrawSetShadow(TdHGinfo, 1);
- TextDrawUseBox(TdHGinfo, 1);
- TextDrawBoxColor(TdHGinfo, 84215140);
- TextDrawTextSize(TdHGinfo, 662.000000, 1.000000);
- DiscSpielerName = TextDrawCreate(492.000000, 414.000000, "wird geladen...");
- TextDrawBackgroundColor(TdSpielerName, 255);
- TextDrawFont(TdSpielerName, 2);
- TextDrawLetterSize(TdSpielerName, 0.240000, 1.300000);
- TextDrawColor(TdSpielerName, -1);
- TextDrawSetOutline(TdSpielerName, 0);
- TextDrawSetProportional(TdSpielerName, 1);
- TextDrawSetShadow(TdSpielerName, 1);
- DiscNachricht = TextDrawCreate(492.000000, 429.000000, "wird geladen...");
- TextDrawBackgroundColor(TdNachricht, 255);
- TextDrawFont(TdNachricht, 2);
- TextDrawLetterSize(TdNachricht, 0.240000, 1.300000);
- TextDrawColor(TdNachricht, -1);
- TextDrawSetOutline(TdNachricht, 0);
- TextDrawSetProportional(TdNachricht, 1);
- TextDrawSetShadow(TdNachricht, 1);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new spname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, spname, sizeof(spname));
- new namestr[100];
- format(namestr, sizeof(namestr), "Spieler ~r~~h~~h~%s~w~,", spname);
- TextDrawSetString(TdSpielerName, namestr);
- new msgstr[255];
- format(msgstr, sizeof(msgstr), "hat den Server betreten.");
- TextDrawSetString(TdNachricht, msgstr);
- new ipadr[16];
- GetPlayerIp(playerid, ipadr, sizeof(ipadr));
- new ipstr[50];
- format(ipstr, sizeof(ipstr), "IP: ~r~~h~%s", ipadr);
- TextDrawSetString(TdSpielerIP, ipstr);
- new pingstr[50];
- format(pingstr, sizeof(pingstr), "Ping: ~r~~h~%d", GetPlayerPing(playerid));
- TextDrawSetString(TdSpielerPing, pingstr);
- ShowConInfo();
- SetTimer("HideConInfo", TIME_to_HIDE, false);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new spname[MAX_PLAYER_NAME];
- GetPlayerName(playerid, spname, sizeof(spname));
- new namestr[100];
- format(namestr, sizeof(namestr), "Spieler ~r~~h~~h~%s~w~,", spname);
- TextDrawSetString(TdSpielerName, namestr);
- new msgstr[255];
- format(msgstr, sizeof(msgstr), "hat den Server verlassen.");
- TextDrawSetString(TdNachricht, msgstr);
- ShowDiscInfo();
- SetTimer("HideDiscInfo", TIME_to_HIDE, false);
- return 1;
- }
- //------------------------------------------------------------------------------
- public ShowConInfo()
- {
- TextDrawShowForAll(TdHeadline);
- TextDrawShowForAll(TdHGinfo);
- TextDrawShowForAll(TdSpielerName);
- TextDrawShowForAll(TdNachricht);
- TextDrawShowForAll(TdTrennung);
- TextDrawShowForAll(TdSpielerIP);
- TextDrawShowForAll(TdSpielerPing);
- }
- public HideConInfo()
- {
- TextDrawHideForAll(TdHeadline);
- TextDrawHideForAll(TdHGinfo);
- TextDrawHideForAll(TdSpielerName);
- TextDrawHideForAll(TdNachricht);
- TextDrawHideForAll(TdTrennung);
- TextDrawHideForAll(TdSpielerIP);
- TextDrawHideForAll(TdSpielerPing);
- }
- public ShowDiscInfo()
- {
- TextDrawShowForAll(DiscHeadline);
- TextDrawShowForAll(DiscHGinfo);
- TextDrawShowForAll(DiscSpielerName);
- TextDrawShowForAll(DiscNachricht);
- }
- public HideDiscInfo()
- {
- TextDrawHideForAll(DiscHeadline);
- TextDrawHideForAll(DiscHGinfo);
- TextDrawHideForAll(DiscSpielerName);
- TextDrawHideForAll(DiscNachricht);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement