Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*******************************************InfoText*******************************************/
- /*******************************************by Snow********************************************/
- /*********************************************� 09*********************************************/
- /**************************When you replace the Copyright you will die!************************/
- #include <a_samp>
- #define SCRIPT_VERS "1.2"
- #define COLOR_RED 0xAA3333AA
- #define COLOR_GREEN 0x33AA33AA
- forward InfoTextPublic(playerid);
- new Text:InfoText[MAX_PLAYERS];
- new bool:InfoTextChange[MAX_PLAYERS];
- public OnFilterScriptInit()
- {
- print("++++++++++++++++++++++++++++++++++++");
- print("############# InfoText #############");
- printf("############# Vers %s #############", SCRIPT_VERS);
- print("############# by Snow #############");
- print("++++++++++++++++++++++++++++++++++++");
- SetTimer("InfoTextPublic", 1000, 1);
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- InfoTextChange[playerid] = true;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp("/info-off", cmdtext, true) == 0)
- {
- InfoTextChange[playerid] = false;
- SendClientMessage(playerid, COLOR_RED, "InfoText -OFF-");
- return 1;
- }
- if(strcmp("/info-on", cmdtext, true) == 0)
- {
- InfoTextChange[playerid] = true;
- SendClientMessage(playerid, COLOR_GREEN, "InfoText -ON-");
- return 1;
- }
- return 0;
- }
- public InfoTextPublic(playerid)
- {
- new String[256];
- new Playaname[MAX_PLAYER_NAME], Serverhour, Serverminute, Serverday, Servermonth, Serveryear;
- GetPlayerName(playerid, Playaname, sizeof(Playaname));
- gettime(Serverhour, Serverminute);
- getdate(Serveryear, Servermonth, Serverday);
- new Playaping = GetPlayerPing(playerid);
- if(InfoTextChange[playerid] == true)
- {
- if(IsPlayerConnected(playerid))
- {
- TextDrawDestroy(InfoText[playerid]);
- }
- }
- if(InfoTextChange[playerid] == true)
- {
- if(IsPlayerConnected(playerid))
- {
- format(String, sizeof(String), "~b~Name: ~w~%s ~b~(~w~%i~b~) ~b~Ping: ~w~%dms ~b~Time: ~w~%d~b~:~w~%d ~b~Date: ~w~%d~b~-~w~%d~b~-~w~%d", Playaname, playerid, Playaping, Serverhour, Serverminute, Serverday, Servermonth, Serveryear);
- InfoText[playerid] = TextDrawCreate(55.000000,430.000000, String);
- TextDrawUseBox(InfoText[playerid],1);
- TextDrawBoxColor(InfoText[playerid],0x00000033);
- TextDrawTextSize(InfoText[playerid],650.000000,0.000000);
- TextDrawAlignment(InfoText[playerid],0);
- TextDrawBackgroundColor(InfoText[playerid],0x000000ff);
- TextDrawFont(InfoText[playerid],1);
- TextDrawLetterSize(InfoText[playerid],0.399999,1.100000);
- TextDrawColor(InfoText[playerid],0xffffffff);
- TextDrawSetOutline(InfoText[playerid],1);
- TextDrawSetProportional(InfoText[playerid],1);
- TextDrawSetShadow(InfoText[playerid],1);
- TextDrawShowForPlayer(playerid, InfoText[playerid]);
- }
- }
- return 1;
- }
- /*******************************************InfoText*******************************************/
- /*******************************************by Snow********************************************/
- /*********************************************� 09*********************************************/
- /**************************When you replace the Copyright you will die!************************/
Advertisement
Add Comment
Please, Sign In to add comment