04.07.2014, 19:22
Its Easy, Just Do Like This.
First Define
use this under your gamemode
if u want to send to all?
use this
and simply add this on your teleport commands.
example:
To Send All
To a Player
First Define
Код:
#define MAX_LINES 3 new Text:TeleportTextdraws[MAX_PLAYERS][MAX_LINES]; new TeleportTextdrawsStr[MAX_PLAYERS][MAX_LINES][256];
Код:
format(TeleportTextdrawsStr[playerid][0], 256, " "); format(TeleportTextdrawsStr[playerid][1], 256, " "); format(TeleportTextdrawsStr[playerid][2], 256, " "); TeleportTextdraws[playerid][0] = TextDrawCreate(342.000000, 400.000000, TeleportTextdrawsStr[playerid][0]); TextDrawBackgroundColor(TeleportTextdraws[playerid][0], 255); TextDrawAlignment(TeleportTextdraws[playerid][0],2); TextDrawFont(TeleportTextdraws[playerid][0],1); TextDrawLetterSize(TeleportTextdraws[playerid][0],0.230000, 0.799999); TextDrawSetOutline(TeleportTextdraws[playerid][0],1); TextDrawSetProportional(TeleportTextdraws[playerid][0],1); TextDrawSetShadow(TeleportTextdraws[playerid][0],0x000000AA); TeleportTextdraws[playerid][1] = TextDrawCreate(342.000000, 377.000000, TeleportTextdrawsStr[playerid][1]); TextDrawBackgroundColor(TeleportTextdraws[playerid][1], 255); TextDrawAlignment(TeleportTextdraws[playerid][1],2); TextDrawFont(TeleportTextdraws[playerid][1],1); TextDrawLetterSize(TeleportTextdraws[playerid][1],0.230000, 0.799999); TextDrawSetOutline(TeleportTextdraws[playerid][1],1); TextDrawSetProportional(TeleportTextdraws[playerid][1],1); TextDrawSetShadow(TeleportTextdraws[playerid][1],0x000000AA); TeleportTextdraws[playerid][2] = TextDrawCreate(342.000000, 356.000000, TeleportTextdrawsStr[playerid][2]); TextDrawBackgroundColor(TeleportTextdraws[playerid][2], 255); TextDrawAlignment(TeleportTextdraws[playerid][2],2); TextDrawFont(TeleportTextdraws[playerid][2],1); TextDrawLetterSize(TeleportTextdraws[playerid][2],0.230000, 0.799999); TextDrawSetOutline(TeleportTextdraws[playerid][2],1); TextDrawSetProportional(TeleportTextdraws[playerid][2],1); TextDrawSetShadow(TeleportTextdraws[playerid][2],0x000000AA);
Код:
stock TeleportTextdraws(playerid,message[]) { format(TeleportTextdrawsStr[playerid][2], 256, "%s",TeleportTextdrawsStr[playerid][1]); TextDrawSetString(TeleportTextdraws[playerid][2], TeleportTextdrawsStr[playerid][2]); format(TeleportTextdrawsStr[playerid][1], 256, "%s",TeleportTextdrawsStr[playerid][0]); TextDrawSetString(TeleportTextdraws[playerid][1], TeleportTextdrawsStr[playerid][1]); format(TeleportTextdrawsStr[playerid][0], 256, "%s",message); TextDrawSetString(TeleportTextdraws[playerid][0], TeleportTextdrawsStr[playerid][0]); }
use this
Код:
stock TeleportTextdrawsToAll(message[]) { for(new i = 0; i < GetMaxPlayers(); i++) { TeleportTextdraws(i,message); } }
example:
To Send All
Код:
format(string, sizeof(string), "Your Message"); TeleportTextdrawsToAll(string);
Код:
format(string, sizeof(string), "Your Message"); TeleportTextdraws(playerid or targetid u want,string);