08.03.2010, 22:33
Hi, i know how to make random messages in chat but can anybody give me example for random textdraws, i really need them, tnx
Originally Posted by Martin_M
The same as random messages, just use TextDrawSetString instead of SendClientMessage.
|
new Text:abc;
new msg;
abc = TextDrawCreate(3.3750, 430.0, "/commands");
TextDrawTextSize(abc,629.000000,2.000000);
TextDrawAlignment(abc,0);
TextDrawFont(abc,2);
TextDrawLetterSize(abc,0.499999,1.399999);
TextDrawColor(abc,0x00FF00FF);
TextDrawSetOutline(abc,1);
TextDrawSetProportional(abc,1);
TextDrawSetShadow(abc,1);
SetTimer("cmdsc",1500,true); // Messages changes every 1.5 sec
TextDrawShowForPlayer(playerid, abc);
forward cmdsc();
public cmdsc()
{
switch (msg)
{
case 0:
{
new newtext[41];
format(newtext, sizeof(newtext), "/help");
TextDrawSetString(abc, newtext);
msg++;
}
case 1:
{
new newtext[41];
format(newtext, sizeof(newtext), "/register");
TextDrawSetString(abc, newtext);
msg=0; // this must be the last!!!
}
}
}