Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Include: A_Infobox
- Include by: Azure
- Version: -
- Release: 26.06.2013
- native InfoText(playerid,overview[50],text[200]);
- */
- new Text:InfoBoxTextdraw[2];
- new Text:InfoBoxPLTextdraw[MAX_PLAYERS][2];
- new bool:InfoTextState[MAX_PLAYERS];
- forward InfoBoxHide(playerid);
- public OnGameModeInit()
- {
- InfoBoxTextdraw[0] = TextDrawCreate(652.000000, 250.000000, "-");
- TextDrawBackgroundColor(InfoBoxTextdraw[0], 255);
- TextDrawFont(InfoBoxTextdraw[0], 1);
- TextDrawLetterSize(InfoBoxTextdraw[0], 0.000000, 10.100000);
- TextDrawColor(InfoBoxTextdraw[0], -1);
- TextDrawSetOutline(InfoBoxTextdraw[0], 0);
- TextDrawSetProportional(InfoBoxTextdraw[0], 1);
- TextDrawSetShadow(InfoBoxTextdraw[0], 1);
- TextDrawUseBox(InfoBoxTextdraw[0], 1);
- TextDrawBoxColor(InfoBoxTextdraw[0], 80);
- TextDrawTextSize(InfoBoxTextdraw[0], 496.000000, 0.000000);
- InfoBoxTextdraw[1] = TextDrawCreate(533.000000, 236.000000, "Information");
- TextDrawBackgroundColor(InfoBoxTextdraw[1], 255);
- TextDrawFont(InfoBoxTextdraw[1], 0);
- TextDrawLetterSize(InfoBoxTextdraw[1], 0.600000, 2.099999);
- TextDrawColor(InfoBoxTextdraw[1], 0x0069FFFF);
- TextDrawSetOutline(InfoBoxTextdraw[1], 0);
- TextDrawSetProportional(InfoBoxTextdraw[1], 1);
- TextDrawSetShadow(InfoBoxTextdraw[1], 1);
- return CallLocalFunction("__OnGameModeInit","");
- }
- #if defined _ALS_OnGameModeInit
- #undef OnGameModeInit
- #else
- #define _ALS_OnGameModeInit
- #endif
- #define OnGameModeInit __OnGameModeInit
- forward __OnGameModeInit();
- stock InfoText(playerid,overview[50],text[200])
- {
- if(!InfoTextState[playerid])
- {
- for(new i;i<sizeof(InfoBoxTextdraw);i++)
- {
- TextDrawShowForPlayer(playerid,InfoBoxTextdraw[i]);
- }
- InfoBoxPLTextdraw[playerid][0] = TextDrawCreate(508.000000, 260.000000, overview);
- TextDrawBackgroundColor(InfoBoxPLTextdraw[playerid][0], 255);
- TextDrawFont(InfoBoxPLTextdraw[playerid][0], 1);
- TextDrawLetterSize(InfoBoxPLTextdraw[playerid][0], 0.500000, 1.500000);
- TextDrawColor(InfoBoxPLTextdraw[playerid][0], 513867775);
- TextDrawSetOutline(InfoBoxPLTextdraw[playerid][0], 0);
- TextDrawSetProportional(InfoBoxPLTextdraw[playerid][0], 1);
- TextDrawSetShadow(InfoBoxPLTextdraw[playerid][0], 1);
- InfoBoxPLTextdraw[playerid][1] = TextDrawCreate(503.000000, 280.000000, text);
- TextDrawBackgroundColor(InfoBoxPLTextdraw[playerid][1], 255);
- TextDrawFont(InfoBoxPLTextdraw[playerid][1], 2);
- TextDrawLetterSize(InfoBoxPLTextdraw[playerid][1], 0.230000, 1.000000);
- TextDrawColor(InfoBoxPLTextdraw[playerid][1], -1);
- TextDrawSetOutline(InfoBoxPLTextdraw[playerid][1], 0);
- TextDrawSetProportional(InfoBoxPLTextdraw[playerid][1], 1);
- TextDrawSetShadow(InfoBoxPLTextdraw[playerid][1], 1);
- TextDrawShowForPlayer(playerid,InfoBoxPLTextdraw[playerid][0]);
- TextDrawShowForPlayer(playerid,InfoBoxPLTextdraw[playerid][1]);
- InfoTextState[playerid]=true;
- SetTimerEx("InfoBoxHide",5000,0,"u",playerid);
- }
- }
- public InfoBoxHide(playerid)
- {
- for(new i;i<sizeof(InfoBoxTextdraw);i++)
- {
- TextDrawHideForPlayer(playerid,InfoBoxTextdraw[i]);
- }
- TextDrawHideForPlayer(playerid,InfoBoxPLTextdraw[playerid][0]);
- TextDrawHideForPlayer(playerid,InfoBoxPLTextdraw[playerid][1]);
- TextDrawDestroy(InfoBoxPLTextdraw[playerid][0]);
- TextDrawDestroy(InfoBoxPLTextdraw[playerid][1]);
- InfoTextState[playerid]=false;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement