Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Code by !TheO 2013
- */
- new
- bool:tCreatet[MAX_PLAYERS],
- bool:tShow[MAX_PLAYERS],
- Text:tHeader[MAX_PLAYERS],
- Text:tInputf[MAX_PLAYERS],
- tTimer[MAX_PLAYERS];
- stock ShowTBox(playerid, Head[15], Input[], time)
- {
- if(!tCreatet[playerid]){
- tInputf[playerid] = TextDrawCreate(505.000000, 201.000000, "");
- TextDrawBackgroundColor(tInputf[playerid], 255);
- TextDrawFont(tInputf[playerid], 2);
- TextDrawLetterSize(tInputf[playerid], 0.230000, 1.300000);
- TextDrawColor(tInputf[playerid], -1);
- TextDrawSetOutline(tInputf[playerid], 0);
- TextDrawSetProportional(tInputf[playerid], 1);
- TextDrawSetShadow(tInputf[playerid], 0);
- TextDrawUseBox(tInputf[playerid], 1);
- TextDrawBoxColor(tInputf[playerid], 336860330);
- TextDrawTextSize(tInputf[playerid], 601.000000, 45.000000);
- tHeader[playerid] = TextDrawCreate(505.000000, 186.000000, "");
- TextDrawBackgroundColor(tHeader[playerid], 255);
- TextDrawFont(tHeader[playerid], 1);
- TextDrawLetterSize(tHeader[playerid], 0.270000, 1.200000);
- TextDrawColor(tHeader[playerid], -1);
- TextDrawSetOutline(tHeader[playerid], 1);
- TextDrawSetProportional(tHeader[playerid], 1);
- TextDrawUseBox(tHeader[playerid], 1);
- TextDrawBoxColor(tHeader[playerid], 170);
- TextDrawTextSize(tHeader[playerid], 601.000000, 0.000000);
- tCreatet[playerid] = true;
- }else{
- if(!tShow[playerid]){
- PlayerPlaySound( playerid, 1052, 0.0, 0.0, 10.0);
- TextDrawShowForPlayer(playerid, tInputf[playerid]);
- TextDrawShowForPlayer(playerid, tHeader[playerid]);
- TextDrawSetString(tHeader[playerid], Head);
- TextDrawSetString(tInputf[playerid], Input);
- tTimer[playerid] = SetTimerEx("HideDraw",time*1000,false,"i",playerid);
- tShow[playerid] = true;
- }
- else
- {
- }
- }
- return 1;
- }
- forward HideDraw(playerid);
- public HideDraw(playerid)
- {
- KillTimer(tTimer[playerid]);
- TextDrawHideForPlayer(playerid, tInputf[playerid]);
- TextDrawHideForPlayer(playerid, tHeader[playerid]);
- tShow[playerid] = false;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement