Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define MAX_HOME_CATEGORIES (4)
- new HomeCategories[MAX_HOME_CATEGORIES][] =
- {
- "Dernières nouveautés",
- "Dernière mise à jour",
- "Connexion",
- "Crédits"
- };
- enum aHomeCategories
- {
- hcID,
- Text:hcBackground,
- Text:hcText,
- hcString[45],
- Float:hcPositionY
- };
- new HOMECATEGORY[MAX_HOME_CATEGORIES][aHomeCategories];
- public OnPlayerRequestLogin(playerid)
- {
- if(cache_num_rows() > 0)
- {
- clearChat(playerid, 20);
- for(new td = 0; td <= sizeof(TDHome); td++)
- {
- TextDrawShowForPlayer(playerid, TDHome[td]);
- }
- showPlayerHomeCategories(playerid);
- }
- return 1;
- }
- stock showPlayerHomeCategories(playerid)
- {
- new Float:categoryBoxPositionY = 98.151855;
- for(new hc = 0; hc < sizeof(HomeCategories); hc++)
- {
- categoryBoxPositionY += 20.000000;
- HOMECATEGORY[hc][hcPositionY] = categoryBoxPositionY;
- HOMECATEGORY[hc][hcBackground] = TextDrawCreate(278.333435, HOMECATEGORY[hc][hcPositionY], "usebox");
- TextDrawLetterSize(HOMECATEGORY[hc][hcBackground], 0.000000, 1.519136);
- TextDrawTextSize(HOMECATEGORY[hc][hcBackground], 98.666687, 0.000000);
- TextDrawAlignment(HOMECATEGORY[hc][hcBackground], 1);
- TextDrawColor(HOMECATEGORY[hc][hcBackground], 0);
- TextDrawUseBox(HOMECATEGORY[hc][hcBackground], true);
- TextDrawBoxColor(HOMECATEGORY[hc][hcBackground], 102);
- TextDrawSetShadow(HOMECATEGORY[hc][hcBackground], 0);
- TextDrawSetOutline(HOMECATEGORY[hc][hcBackground], 0);
- TextDrawFont(HOMECATEGORY[hc][hcBackground], 0);
- HOMECATEGORY[hc][hcText] = TextDrawCreate(102.999961, HOMECATEGORY[hc][hcPositionY]+1.000000, "");
- TextDrawLetterSize(HOMECATEGORY[hc][hcText], 0.229333, 1.579259);
- TextDrawAlignment(HOMECATEGORY[hc][hcText], 1);
- TextDrawColor(HOMECATEGORY[hc][hcText], -1);
- TextDrawSetShadow(HOMECATEGORY[hc][hcText], 0);
- TextDrawSetOutline(HOMECATEGORY[hc][hcText], 1);
- TextDrawBackgroundColor(HOMECATEGORY[hc][hcText], 51);
- TextDrawFont(HOMECATEGORY[hc][hcText], 1);
- TextDrawSetProportional(HOMECATEGORY[hc][hcText], 1);
- TextDrawSetSelectable(HOMECATEGORY[hc][hcText], true);
- format(HOMECATEGORY[hc][hcString], 45, HomeCategories[hc]);
- set_UTF8(HOMECATEGORY[hc][hcString]);
- TextDrawSetString(HOMECATEGORY[hc][hcText], HOMECATEGORY[hc][hcString]);
- TextDrawShowForPlayer(playerid, HOMECATEGORY[hc][hcBackground]);
- TextDrawShowForPlayer(playerid, HOMECATEGORY[hc][hcText]);
- SelectTextDraw(playerid, COLOR_GREY);
- HOMECATEGORY[hc][hcID] = hc;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement