Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //5 new game-text styles by [XST]O_x
- //First include!
- #include <a_samp>
- forward TextDrawDestroyTimer1(TextDrawID);
- forward TextDrawDestroyTimer2(TextDrawID);
- forward TextDrawDestroyTimer3(TextDrawID);
- forward TextDrawDestroyTimer4(TextDrawID);
- forward TextDrawDestroyTimer5(TextDrawID);
- new Text:gTextStyle1[128];
- new Text:gTextStyle2[128];
- new Text:gTextStyle3[128];
- new Text:gTextStyle4[128];
- new Text:gTextStyle5[128];
- new textcount;
- new textcountP;
- /*
- native GameTextCostumeForPlayer(playerid,msg[],seconds,style);
- native GameTextCostumeForAll(msg[],seconds,style);
- */
- stock GameTextCostumeForPlayer(playerid,msg[],seconds,style)
- {
- textcountP++;
- if(textcountP >= 128) textcountP = 0; //By Seif_
- gTextStyle1[textcountP] = TextDrawCreate(14.000000, 308.000000, msg);
- TextDrawBackgroundColor(gTextStyle1[textcountP], 255);
- TextDrawFont(gTextStyle1[textcountP], 2);
- TextDrawLetterSize(gTextStyle1[textcountP], 1.060000, 3.199999);
- TextDrawColor(gTextStyle1[textcountP], -1);
- TextDrawSetOutline(gTextStyle1[textcountP], 1);
- TextDrawSetProportional(gTextStyle1[textcountP], 1);
- gTextStyle2[textcountP] = TextDrawCreate(521.000000, 101.000000, msg);
- TextDrawBackgroundColor(gTextStyle2[textcountP], 255);
- TextDrawFont(gTextStyle2[textcountP], 1);
- TextDrawLetterSize(gTextStyle2[textcountP], 0.480000, 1.000000);
- TextDrawColor(gTextStyle2[textcountP], -1);
- TextDrawSetOutline(gTextStyle2[textcountP], 1);
- TextDrawSetProportional(gTextStyle2[textcountP], 1);
- gTextStyle3[textcountP] = TextDrawCreate(291.000000, 431.000000, msg);
- TextDrawBackgroundColor(gTextStyle3[textcountP], 255);
- TextDrawFont(gTextStyle3[textcountP], 3);
- TextDrawLetterSize(gTextStyle3[textcountP], 0.500000, 1.000000);
- TextDrawColor(gTextStyle3[textcountP], -1);
- TextDrawSetOutline(gTextStyle3[textcountP], 1);
- TextDrawSetProportional(gTextStyle3[textcountP], 1);
- gTextStyle4[textcountP] = TextDrawCreate(506.000000, 341.000000, msg);
- TextDrawBackgroundColor(gTextStyle4[textcountP], 255);
- TextDrawFont(gTextStyle4[textcountP], 0);
- TextDrawLetterSize(gTextStyle4[textcountP], 1.130000, 3.899999);
- TextDrawColor(gTextStyle4[textcountP], -1);
- TextDrawSetOutline(gTextStyle4[textcountP], 1);
- TextDrawSetProportional(gTextStyle4[textcountP], 1);
- gTextStyle5[textcountP] = TextDrawCreate(271.000000, 172.000000, msg);
- TextDrawBackgroundColor(gTextStyle5[textcountP], 255);
- TextDrawFont(gTextStyle5[textcountP], 2);
- TextDrawLetterSize(gTextStyle5[textcountP], 0.679999, 2.199999);
- TextDrawColor(gTextStyle5[textcountP], -1);
- TextDrawSetOutline(gTextStyle5[textcountP], 1);
- TextDrawSetProportional(gTextStyle5[textcountP], 1);
- if(style == 1)
- {
- TextDrawShowForPlayer(playerid,gTextStyle1[textcountP]);
- SetTimerEx("TextDrawDestroyTimer1",seconds*1000,0,"d",textcountP);
- }
- else if(style == 2)
- {
- TextDrawShowForPlayer(playerid,gTextStyle2[textcountP]);
- SetTimerEx("TextDrawDestroyTimer2",seconds*1000,0,"d",textcountP);
- }
- else if(style == 3)
- {
- TextDrawShowForPlayer(playerid,gTextStyle3[textcountP]);
- SetTimerEx("TextDrawDestroyTimer3",seconds*1000,0,"d",textcountP);
- }
- else if(style == 4)
- {
- TextDrawShowForPlayer(playerid,gTextStyle4[textcountP]);
- SetTimerEx("TextDrawDestroyTimer4",seconds*1000,0,"d",textcountP);
- }`
- else if(style == 5)
- {
- TextDrawShowForPlayer(playerid,gTextStyle5[textcountP]);
- SetTimerEx("TextDrawDestroyTimer5",seconds*1000,0,"d",textcountP);
- }
- }
- stock GameTextCostumeForAll(msg[],seconds,style)
- {
- textcount++;
- if(textcount >= 128) textcount = 0; //By Seif_
- gTextStyle1[textcount] = TextDrawCreate(14.000000, 308.000000, msg);
- TextDrawBackgroundColor(gTextStyle1[textcount], 255);
- TextDrawFont(gTextStyle1[textcount], 2);
- TextDrawLetterSize(gTextStyle1[textcount], 1.060000, 3.199999);
- TextDrawColor(gTextStyle1[textcount], -1);
- TextDrawSetOutline(gTextStyle1[textcount], 1);
- TextDrawSetProportional(gTextStyle1[textcount], 1);
- gTextStyle2[textcount] = TextDrawCreate(521.000000, 101.000000, msg);
- TextDrawBackgroundColor(gTextStyle2[textcount], 255);
- TextDrawFont(gTextStyle2[textcount], 1);
- TextDrawLetterSize(gTextStyle2[textcount], 0.480000, 1.000000);
- TextDrawColor(gTextStyle2[textcount], -1);
- TextDrawSetOutline(gTextStyle2[textcount], 1);
- TextDrawSetProportional(gTextStyle2[textcount], 1);
- gTextStyle3[textcount] = TextDrawCreate(291.000000, 431.000000, msg);
- TextDrawBackgroundColor(gTextStyle3[textcount], 255);
- TextDrawFont(gTextStyle3[textcount], 3);
- TextDrawLetterSize(gTextStyle3[textcount], 0.500000, 1.000000);
- TextDrawColor(gTextStyle3[textcount], -1);
- TextDrawSetOutline(gTextStyle3[textcount], 1);
- TextDrawSetProportional(gTextStyle3[textcount], 1);
- gTextStyle4[textcount] = TextDrawCreate(506.000000, 341.000000, msg);
- TextDrawBackgroundColor(gTextStyle4[textcount], 255);
- TextDrawFont(gTextStyle4[textcount], 0);
- TextDrawLetterSize(gTextStyle4[textcount], 1.130000, 3.899999);
- TextDrawColor(gTextStyle4[textcount], -1);
- TextDrawSetOutline(gTextStyle4[textcount], 1);
- TextDrawSetProportional(gTextStyle4[textcount], 1);
- gTextStyle5[textcount] = TextDrawCreate(271.000000, 172.000000, msg);
- TextDrawBackgroundColor(gTextStyle5[textcount], 255);
- TextDrawFont(gTextStyle5[textcount], 2);
- TextDrawLetterSize(gTextStyle5[textcount], 0.679999, 2.199999);
- TextDrawColor(gTextStyle5[textcount], -1);
- TextDrawSetOutline(gTextStyle5[textcount], 1);
- TextDrawSetProportional(gTextStyle5[textcount], 1);
- if(style == 1)
- {
- TextDrawShowForAll(gTextStyle1[textcount]);
- SetTimerEx("TextDrawDestroyTimer1",seconds*1000,0,"d",textcount);
- }
- else if(style == 2)
- {
- TextDrawShowForAll(gTextStyle2[textcount]);
- SetTimerEx("TextDrawDestroyTimer2",seconds*1000,0,"d",textcount);
- }
- else if(style == 3)
- {
- TextDrawShowForAll(gTextStyle3[textcount]);
- SetTimerEx("TextDrawDestroyTimer3",seconds*1000,0,"d",textcount);
- }
- else if(style == 4)
- {
- TextDrawShowForAll(gTextStyle4[textcount]);
- SetTimerEx("TextDrawDestroyTimer4",seconds*1000,0,"d",textcount);
- }
- else if(style == 5)
- {
- TextDrawShowForAll(gTextStyle5[textcount]);
- SetTimerEx("TextDrawDestroyTimer5",seconds*1000,0,"d",textcount);
- }
- }
- public TextDrawDestroyTimer1(TextDrawID)
- {
- TextDrawDestroy(gTextStyle1[TextDrawID]);
- return 1;
- }
- public TextDrawDestroyTimer2(TextDrawID)
- {
- TextDrawDestroy(gTextStyle2[TextDrawID]);
- return 1;
- }
- public TextDrawDestroyTimer3(TextDrawID)
- {
- TextDrawDestroy(gTextStyle3[TextDrawID]);
- return 1;
- }
- public TextDrawDestroyTimer4(TextDrawID)
- {
- TextDrawDestroy(gTextStyle4[TextDrawID]);
- return 1;
- }
- public TextDrawDestroyTimer5(TextDrawID)
- {
- TextDrawDestroy(gTextStyle5[TextDrawID]);
- return 1;
- }
- ///END///
Advertisement
Add Comment
Please, Sign In to add comment