02.02.2015, 09:34
Well. First create variable for Textdraw.
Then, should create the Textdraw under OnFilterScriptInit if you're using a Filterscript, or OnGameModeInit() if you're using a Gamemode.
More info:
- TextDrawCreate();
If you want Textdraw to be more preety, use an Textdraw Edtior, like: iPLEOMAX's Textdraw Editor.
Then, create that command to make a screen announce and to set string of Textdraw.
Now, should work, and hope you understood and learned.
Can make a /Hide command to hide that textdraw.
pawn Код:
new Text:Textdraw
pawn Код:
public OnGameModeInit()
{
Textdraw = TextDrawCreate(........);
TextDrawSetFont(........);
// etc.
return 1;
}
- TextDrawCreate();
If you want Textdraw to be more preety, use an Textdraw Edtior, like: iPLEOMAX's Textdraw Editor.
Then, create that command to make a screen announce and to set string of Textdraw.
pawn Код:
CMD:message(playerid, params[]) //Command Message. Change if you want.
{ // Open bracket.
new string[50]; // Variables.
if(isnull(params)) return SendClientMessage(playerid, -1, "{FF0000}USAGE: {FFFFFF}/Message [Text]"); // Use isnull(params) function, because it's more efficiently, and you check more faster if params are null.
if(!strlen(params)) return SendClientMessage(playerid, -1, "{FF0000}ERROR: {FFFFFF}You didn't write anything."); // Use this function strlen(params); to check if the player have writed something in params.
format(string, sizeof(string), "%s", params); // Formatting the params.
TextDrawSetString(Textdraw, string); // Set's params string to our created Textdraw.
TextDrawShowForAll(Textdraw); // Use this function to show created textdraw too all players.
return 1; // Return 1;
} // Close bracket.
Can make a /Hide command to hide that textdraw.
pawn Код:
CMD:hide(playerid, params[]) // Command hide.
{ // Open bracket.
TextDrawHideForAll(Textdraw); // Will hide textdraw for all players.
return 1; // Returns 1;
} // Close bracket.