06.08.2010, 02:48
Hi, i want make when player spawn appears a textdraw saying "Welcome Name_LastName" and after 4 seconds dissapears.. i make this code but the textdraw dont appears :S help me if the code is wrong..
Top Code
OnPlayerConnect
TextBienvenido Function
OnPlayerSpawn
TerminarBienvenida Function
OnPlayerDisconnect
Top Code
Код:
new Text:bienvenido[MAX_PLAYERS];
Код:
TextBienvenido(playerid);
Код:
public TextBienvenido(playerid) { bienvenido[playerid] = TextDrawCreate(8.000000, 420.000000, "Bienvenido"); TextDrawBackgroundColor(bienvenido[playerid], 255); TextDrawFont(bienvenido[playerid], 0); TextDrawLetterSize(bienvenido[playerid], 0.689999, 2.499999); TextDrawColor(bienvenido[playerid], -1); TextDrawSetOutline(bienvenido[playerid], 0); TextDrawSetProportional(bienvenido[playerid], 1); TextDrawSetShadow(bienvenido[playerid], 1); }
Код:
TextDrawShowForPlayer(playerid, bienvenido[playerid]); SetTimerEx("TerminarBienvenida", 4000, 0, "i", playerid);
Код:
public TerminarBienvenida(playerid) { TextDrawHideForPlayer(playerid, bienvenido[playerid]); }
Код:
public OnPlayerDisconnect(playerid, reason) { TextDrawHideForAll(bienvenido[playerid]); TextDrawDestroy(bienvenido[playerid]); return 1; }