12.02.2010, 17:47
OnPlayerDisconnect
OnPlayerConnect
Timers:
OnGameModeInit
2 things.
1) The first time you connect, It loads and it disappears at the time I want it to. The scond time you join, it appears, but not for all players that are connected and it doesn't disappear at the time I want it.
2) This is not working for all players that are in the game right now.
pawn Код:
new newtext[41], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(newtext, sizeof(newtext), "~r~%s ~w~has left the server", name);
TextDrawSetString(TextdrawJoin1, newtext);
TextDrawShowForAll(TextdrawJoin1);
SetTimer("TextdrawDisconnectRemove", 9000, true);
pawn Код:
new newtext[41], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
format(newtext, sizeof(newtext), "~g~%s ~w~has joined the server.", name);
TextDrawSetString(TextdrawJoin, newtext);
TextDrawShowForAll(TextdrawJoin);
SetTimer("TextdrawJoinRemove", 9000, true);
pawn Код:
forward TextdrawJoinRemove();
public TextdrawJoinRemove()
{
TextDrawHideForAll(TextdrawJoin);
}
pawn Код:
forward TextdrawDisconnectRemove();
public TextdrawDisconnectRemove()
{
TextDrawHideForAll(TextdrawJoin1);
}
pawn Код:
TextdrawJoin = TextDrawCreate(35.000000,122.000000," ");
TextdrawJoin1 = TextDrawCreate(35.000000,134.000000," ");
TextDrawAlignment(TextdrawJoin,0);
TextDrawAlignment(TextdrawJoin1,0);
TextDrawBackgroundColor(TextdrawJoin,0x000000ff);
TextDrawBackgroundColor(TextdrawJoin1,0x000000ff);
TextDrawFont(TextdrawJoin,1);
TextDrawLetterSize(TextdrawJoin,0.299999,1.200000);
TextDrawFont(TextdrawJoin1,1);
TextDrawLetterSize(TextdrawJoin1,0.299999,1.100000);
TextDrawColor(TextdrawJoin,0xffffffff);
TextDrawColor(TextdrawJoin1,0xffffffff);
TextDrawSetOutline(TextdrawJoin,1);
TextDrawSetOutline(TextdrawJoin1,1);
TextDrawSetProportional(TextdrawJoin,1);
TextDrawSetProportional(TextdrawJoin1,1);
TextDrawSetShadow(TextdrawJoin,1);
TextDrawSetShadow(TextdrawJoin1,1);
1) The first time you connect, It loads and it disappears at the time I want it to. The scond time you join, it appears, but not for all players that are connected and it doesn't disappear at the time I want it.
2) This is not working for all players that are in the game right now.