24.03.2018, 23:28
Simply make it new Text:textdraw1; instead of new Text:textdraw1[MAX_PLAYERS]; (also make changes under OnGameModeInit if it was a gamemode or under OnFilterScriptInit)
and when player CONNECT write the final line under
OnPlayerConnect(playerid)
so it should be looking like this:
The whole code:
and when player CONNECT write the final line under
OnPlayerConnect(playerid)
so it should be looking like this:
PHP код:
public OnPlayerConnect(playerid)
{
TextDrawShowForPlayer(playerid, textdraw1);
return 1;
}
PHP код:
new Text:textdraw1;
public OnFilterScriptInit()
{
textdraw1 = CreatePlayerTextDraw(playerid, -28.000000, 348.812500, "");
PlayerTextDrawLetterSize(playerid, textdraw1, 0.000000, 0.000000);
PlayerTextDrawTextSize(playerid, textdraw1, 90.000000, 90.000000);
PlayerTextDrawAlignment(playerid, textdraw1, 1);
PlayerTextDrawColor(playerid, textdraw1, -1);
PlayerTextDrawSetShadow(playerid, textdraw1, 0);
PlayerTextDrawSetOutline(playerid, textdraw1, 0);
PlayerTextDrawBackgroundColor(playerid, textdraw1, 0);
PlayerTextDrawFont(playerid, textdraw1, 5);
PlayerTextDrawSetProportional(playerid, textdraw1, 0);
PlayerTextDrawSetShadow(playerid, textdraw1, 0);
PlayerTextDrawSetPreviewModel(playerid, textdraw1, 0);
PlayerTextDrawSetPreviewRot(playerid, textdraw1, 0.000000, 0.000000, 15.000000, 1.000000);
return 1;
}
public OnPlayerConnect(playerid)
{
TextDrawShowPlayer(playerid, textdraw1);
return 1;
}