new PlayerText:textdraw2;
new PlayerText:textdraw3;
public OnPlayerConnect(playerid)
{
// WELCOME BACK
textdraw2 = CreatePlayerTextDraw(playerid, 634.500000, 311.187500, "Welcome back");
PlayerTextDrawLetterSize(playerid, textdraw2, 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw2, 3);
PlayerTextDrawColor(playerid, textdraw2, -1);
PlayerTextDrawSetShadow(playerid, textdraw2, 0);
PlayerTextDrawSetOutline(playerid, textdraw2, 1);
PlayerTextDrawBackgroundColor(playerid, textdraw2, 255);
PlayerTextDrawFont(playerid, textdraw2, 2);
PlayerTextDrawSetProportional(playerid, textdraw2, 1);
PlayerTextDrawSetShadow(playerid, textdraw2, 0);
textdraw3 = CreatePlayerTextDraw(playerid, 606.000000, 331.312500, "andrei !");
PlayerTextDrawLetterSize(playerid, textdraw3, 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw3, 3);
PlayerTextDrawColor(playerid, textdraw3, -1);
PlayerTextDrawSetShadow(playerid, textdraw3, 0);
PlayerTextDrawSetOutline(playerid, textdraw3, -1);
PlayerTextDrawBackgroundColor(playerid, textdraw3, 255);
PlayerTextDrawFont(playerid, textdraw3, 2);
PlayerTextDrawSetProportional(playerid, textdraw3, 1);
PlayerTextDrawSetShadow(playerid, textdraw3, 0);
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid,textdraw2);
TextDrawShowForPlayer(playerid,textdraw3);
return 1;
}
textdraw.pwn(61) : warning 213: tag mismatch
textdraw.pwn(62) : warning 213: tag mismatch
new PlayerText:textdraw2[MAX_PLAYERS];
new PlayerText:textdraw3[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
// WELCOME BACK
textdraw2[playerid] = CreatePlayerTextDraw(playerid, 634.500000, 311.187500, "Welcome back");
PlayerTextDrawLetterSize(playerid, textdraw2[playerid], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw2[playerid], 3);
PlayerTextDrawColor(playerid, textdraw2[playerid], -1);
PlayerTextDrawSetShadow(playerid, textdraw2[playerid], 0);
PlayerTextDrawSetOutline(playerid, textdraw2[playerid], 1);
PlayerTextDrawBackgroundColor(playerid, textdraw2[playerid], 255);
PlayerTextDrawFont(playerid, textdraw2[playerid], 2);
PlayerTextDrawSetProportional(playerid, textdraw2[playerid], 1);
PlayerTextDrawSetShadow(playerid, textdraw2[playerid], 0);
textdraw3[playerid] = CreatePlayerTextDraw(playerid, 606.000000, 331.312500, "andrei !");
PlayerTextDrawLetterSize(playerid, textdraw3[playerid], 0.400000, 1.600000);
PlayerTextDrawAlignment(playerid, textdraw3[playerid], 3);
PlayerTextDrawColor(playerid, textdraw3[playerid], -1);
PlayerTextDrawSetShadow(playerid, textdraw3[playerid], 0);
PlayerTextDrawSetOutline(playerid, textdraw3[playerid], -1);
PlayerTextDrawBackgroundColor(playerid, textdraw3[playerid], 255);
PlayerTextDrawFont(playerid, textdraw3[playerid], 2);
PlayerTextDrawSetProportional(playerid, textdraw3[playerid], 1);
PlayerTextDrawSetShadow(playerid, textdraw3[playerid], 0);
return 1;
}
public OnPlayerSpawn(playerid)
{
PlayerTextDrawShow(playerid, textdraw2[playerid]);
PlayerTextDrawShow(playerid, textdraw3[playerid]);
return 1;
}
Your problem is that you mix between Global Textdraw and Player Textdraw
PHP код:
|
new PlayerText:textdraw2;
new PlayerText:textdraw3;
new Text:textdraw2;
new Text:textdraw3;
public OnFilterScriptInit()
{
textdraw2 = CreateTextDraw(634.500000, 311.187500, "Welcome back");
TextDrawLetterSize(textdraw2, 0.400000, 1.600000);
TextDrawAlignment(textdraw2, 3);
TextDrawColor(textdraw2, -1);
TextDrawSetShadow(textdraw2, 0);
TextDrawSetOutline(textdraw2, 1);
TextDrawBackgroundColor(textdraw2, 255);
TextDrawFont(textdraw2, 2);
TextDrawSetProportional(textdraw2, 1);
TextDrawSetShadow(textdraw2, 0);
textdraw3 = CreateTextDraw(606.000000, 331.312500, "andrei !");
TextDrawLetterSize(textdraw3, 0.400000, 1.600000);
TextDrawAlignment(textdraw3, 3);
TextDrawColor(textdraw3, -1);
TextDrawSetShadow(textdraw3, 0);
TextDrawSetOutline(textdraw3, -1);
TextDrawBackgroundColor(textdraw3, 255);
TextDrawFont(textdraw3, 2);
TextDrawSetProportional(textdraw3, 1);
TextDrawSetShadow(textdraw3, 0);
return 1;
}
public OnFilterScriptExit()
{
TextDrawDestroy(textdraw2);
TextDrawDestroy(textdraw2);
return 1;
}
public OnPlayerConnect(playerid) // i think it was meant to be onconnect not spawn
{
TextDrawShowForPlayer(playerid, textdraw2);
TextDrawShowForPlayer(playerid, textdraw3);
return 1;
}
public OnGameModeInit()
{
textdraw2 = CreateTextDraw(634.500000, 311.187500, "Welcome back");
TextDrawLetterSize(textdraw2, 0.400000, 1.600000);
TextDrawAlignment(textdraw2, 3);
TextDrawColor(textdraw2, -1);
TextDrawSetShadow(textdraw2, 0);
TextDrawSetOutline(textdraw2, 1);
TextDrawBackgroundColor(textdraw2, 255);
TextDrawFont(textdraw2, 2);
TextDrawSetProportional(textdraw2, 1);
TextDrawSetShadow(textdraw2, 0);
textdraw3 = CreateTextDraw(606.000000, 331.312500, "andrei !");
TextDrawLetterSize(textdraw3, 0.400000, 1.600000);
TextDrawAlignment(textdraw3, 3);
TextDrawColor(textdraw3, -1);
TextDrawSetShadow(textdraw3, 0);
TextDrawSetOutline(textdraw3, -1);
TextDrawBackgroundColor(textdraw3, 255);
TextDrawFont(textdraw3, 2);
TextDrawSetProportional(textdraw3, 1);
TextDrawSetShadow(textdraw3, 0);
return 1;
}
public OnGameModeExit()
{
TextDrawDestroy(textdraw2);
TextDrawDestroy(textdraw2);
return 1;
}
public OnPlayerConnect(playerid) // i think it was meant to be onconnect not spawn
{
TextDrawShowForPlayer(playerid, textdraw2);
TextDrawShowForPlayer(playerid, textdraw3);
return 1;
}
instead of changing it to text you set it to player text!!!!! why, its just a a message thats just a waste of player text draws
|