Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public OnPlayerConnect(playerid)
- {
- ResetVars(playerid);
- PlayerBox[playerid] = CreatePlayerTextDraw(playerid,17.000007, 126.118553, "Text__");
- PlayerTextDrawLetterSize(playerid,PlayerBox[playerid], 0.517666, 2.006517);
- PlayerTextDrawAlignment(playerid,PlayerBox[playerid], 1);
- PlayerTextDrawColor(playerid,PlayerBox[playerid], COLOR_GREY);
- PlayerTextDrawSetShadow(playerid,PlayerBox[playerid], 0);
- PlayerTextDrawSetOutline(playerid,PlayerBox[playerid], 0);
- PlayerTextDrawBackgroundColor(playerid,PlayerBox[playerid], 255);
- PlayerTextDrawFont(playerid,PlayerBox[playerid], 1);
- PlayerTextDrawSetProportional(playerid,PlayerBox[playerid], 1);
- PlayerTextDrawSetShadow(playerid,PlayerBox[playerid], 0);
- PlayerTextDrawBoxColor(playerid,PlayerBox[playerid], 0x00000089);
- PlayerTextDrawUseBox(playerid,PlayerBox[playerid], 1);
- return 1;
- }
- stock ShowPlayerBox(playerid,textbox[],interval)
- {
- if(!strlen(textbox)) {SCM(playerid,-1,"11111"); return 0;}
- if(strlen(textbox) > 150) {SCM(playerid,-1,"22222"); return 0;}
- if(interval <-1 || interval > 1000) {SCM(playerid,-1,"333333"); return 0;}
- if(PlayerInfo[playerid][pTextDrawShown]==true) {SCM(playerid,-1,"444444"); return 0;}
- new stringend[23],string[155];
- PlayerInfo[playerid][pTextDrawShown]=true;
- if(interval !=-1) // nicht uendlich
- {
- PlayerPlaySound(playerid,1153,0.0, 0.0, 0.0);
- SetTimerEx("HideBox", interval*1000, false, "i", playerid);
- }
- format(string,sizeof(string),"%s",textbox);
- strreplace(string,' ','_');
- PlayerTextDrawSetString(playerid,PlayerBox[playerid],string);
- PlayerTextDrawShow(playerid, PlayerBox[playerid]);
- PlayerPlaySound(playerid,183,0.0,0.0,0.0);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement