Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Shadows Info Box, Created for his Deathmatch Script
- With this You can make lots of things, for every public or command
- Simply use this format
- ShadInfoBoxForPlayer(playerid, "Title~n~~n~(Information here)");
- ~n~ = new line
- ~r~ = color red
- ~w~ = color white
- ~y~ = color yellow
- ~b~ = color blue
- ~p~ = color purple
- ] = star
- ~l~ = color black
- Have fun, Please give Credits if you implement into your own script
- Add these functions in your own gamemode under the specified public..
- OnShadowInit(); - OnGameModeInit() or OnFilterScriptInit()
- OnShadowCommand(playerid, cmdtext); - OnPlayerCommandText(playerid, cmdtext[])
- OnShadowText(playerid, text); - OnPlayerText(playerid, text[])
- */
- new Text:ShadInfoBox;
- new ShadInfoBoxShowing[MAX_PLAYERS];
- forward OnShadowInit();
- public OnShadowInit()
- {
- print("\n----------------------------------");
- print(" Info Box - Created by Shadow");
- print("----------------------------------\n");
- ShadInfoBox = TextDrawCreate(36.000000, 144.000000, "___");
- TextDrawBackgroundColor(ShadInfoBox, 255);
- TextDrawFont(ShadInfoBox, 2);
- TextDrawLetterSize(ShadInfoBox, 0.250000, 1.099999);
- TextDrawColor(ShadInfoBox, -1);
- TextDrawSetOutline(ShadInfoBox, 0);
- TextDrawSetProportional(ShadInfoBox, 1);
- TextDrawSetShadow(ShadInfoBox, 1);
- TextDrawUseBox(ShadInfoBox, 1);
- TextDrawBoxColor(ShadInfoBox, 118);
- TextDrawTextSize(ShadInfoBox, 180.000000, 5.000000);
- return 1;
- }
- forward OnShadowCommand(playerid, cmdtext[]);
- public OnShadowCommand(playerid, cmdtext[])
- {
- if(!strcmp(cmdtext, "/info", true))
- {
- ShadInfoBoxForPlayer(playerid, "Test Menu~n~~n~~r~You could put anything here~n~Commands~n~Information~n~Stats?~n~Have Fun");
- return 1;
- }
- return 0;
- }
- stock ShadInfoBoxForPlayer(playerid, text[])
- {
- TextDrawHideForPlayer(playerid, ShadInfoBox);
- new info[700];
- ShadInfoBoxShowing[playerid] = 1;
- format(info, sizeof(info), "%s~n~~n~~y~Type Exit to hide this menu", text);
- TextDrawSetString(ShadInfoBox, info);
- TextDrawShowForPlayer(playerid, ShadInfoBox);
- }
- forward DeleteShadInfo(playerid);
- public DeleteShadInfo(playerid)
- {
- printf("(%d) Has Just Deleted the Shadow Info Box From his Screen",playerid);
- TextDrawHideForPlayer(playerid, ShadInfoBox);
- TextDrawDestroy(ShadInfoBox);
- }
- forward OnShadowText(playerid, text[]);
- public OnShadowText(playerid, text[])
- {
- if (strcmp("Exit", text, true, 10) == 0)
- {
- if(ShadInfoBoxShowing[playerid] == 1)
- {
- printf("(%d) Has Just Deleted the Shadow Info Box From his Screen",playerid);
- TextDrawHideForPlayer(playerid, ShadInfoBox);
- return 0;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement