05.09.2010, 13:48
pawn Code:
new
isInfoServShow[ MAX_PLAYERS char ];
public OnGameModeInit()
{
welcomeText = TextDrawCreate(20.0,300.0,"~b~Welcome To ~r~russian server HAD ~y~6.2!");
TextDrawLetterSize(welcomeText, 1, 2.2);
rulText = TextDrawCreate(180.0,330.0,"~y~/rules ~w~- server rules");
TextDrawFont(rulText, 2);
cmdText = TextDrawCreate(180.0,345.0,"~y~/cmd ~w~- server commands");
TextDrawFont(cmdText, 2);
infoText = TextDrawCreate(180.0,360.0,"~y~/server ~w~- server info");
TextDrawFont(infoText, 2);
}
public OnPlayerConnect(playerid)
{
isInfoServShow{playerid} = true;
TextDrawShowForPlayer(playerid,welcomeText);
TextDrawShowForPlayer(playerid,rulText);
TextDrawShowForPlayer(playerid,cmdText);
TextDrawShowForPlayer(playerid,infoText);
}
public OnPlayerSpawn(playerid)
{
if ( isInfoServShow{playerid} )
{
TextDrawHideForPlayer(playerid,welcomeText);
TextDrawHideForPlayer(playerid,rulText);
TextDrawHideForPlayer(playerid,cmdText);
TextDrawHideForPlayer(playerid,infoText);
isInfoServShow{playerid} = false;
}
}