24.09.2017, 20:20
Hi everybody,
I'm doing textdraws, for information for each team.
When the player connects he is on the Triad team.
The information is displayed correctly, but the problem is when I go to another team normally the textdraw should disappear, but it does not disappear.
Here is the script
Here is a screen:
http://hpics.li/a2b0085
http://hpics.li/3927524
In the second screen you can see that the textdraw are not break.
I've been trying to fix it for two hours.
I would like continue to script my server. ^^
Thanks
I'm doing textdraws, for information for each team.
When the player connects he is on the Triad team.
The information is displayed correctly, but the problem is when I go to another team normally the textdraw should disappear, but it does not disappear.
Here is the script
PHP код:
new PlayerText:Textdraw2[MAX_PLAYERS][14];
public OnPlayerRequestClass(playerid, classid)
{
switch(classid)
{
case 0..2: //1 2 et 3
{
Team[playerid] = TEAM_TRIAD;
SetPlayerPos(playerid,2028.0615,1007.9283,10.8203);
SetPlayerCameraPos(playerid,2044.2784,1007.7114,10.6719);
SetPlayerCameraLookAt(playerid,2028.0615,1007.9283,10.8203);
SetPlayerFacingAngle(playerid,270);
SetPlayerColor(playerid,0xFFFF00FF);
GameTextForPlayer(playerid,"~w~Team ~y~Triads",2000,4);
TextDrawTriad(playerid);
}
case 3..5:
{
Team[playerid] = TEAM_SINDACCO;
SetPlayerPos(playerid,2188.7944,1677.0432,11.1162);
SetPlayerCameraPos(playerid,2173.4385,1676.8881,10.8203);
SetPlayerCameraLookAt(playerid,2188.7944,1677.0432,11.1162);
SetPlayerFacingAngle(playerid,100);
SetPlayerColor(playerid,0x808040FF);
GameTextForPlayer(playerid,"~w~Team ~g~Sindacco",2000,4);
DeleteTextdraw(playerid);
}
case 6..8:
{
Team[playerid] = TEAM_POLICE;
SetPlayerPos(playerid,2289.7913,2422.8516,10.8203);
SetPlayerCameraPos(playerid,2289.6187,2412.5552,10.8443);
SetPlayerCameraLookAt(playerid,2289.7913,2422.8516,10.8203);
SetPlayerFacingAngle(playerid,100);
SetPlayerColor(playerid,0x0000FFFF);
GameTextForPlayer(playerid,"~w~Team ~b~Cops",2000,4);
}
}
return 1;
}
stock TextDrawTriad(playerid)
{
Textdraw2[playerid][4] = CreatePlayerTextDraw(playerid, 472.333221, 288.137084, "usebox");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][4], 0.000000, 11.712965);
PlayerTextDrawTextSize(playerid, Textdraw2[playerid][4], 181.333374, 0.000000);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][4], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][4], 0);
PlayerTextDrawUseBox(playerid, Textdraw2[playerid][4], true);
PlayerTextDrawBoxColor(playerid, Textdraw2[playerid][4], 102);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][4], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][4], 0);
PlayerTextDrawFont(playerid, Textdraw2[playerid][4], 0);
PlayerTextDrawShow(playerid,Textdraw2[playerid][4]);
Textdraw2[playerid][5] = CreatePlayerTextDraw(playerid, 183.666488, 288.296142, "~p~Team: ~y~Triads");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][5], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][5], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][5], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][5], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][5], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][5], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][5], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][5], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][5]);
Textdraw2[playerid][6] = CreatePlayerTextDraw(playerid, 184.000045, 309.866699, "~p~Location: ~y~Four dragons casino");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][6], 0.314999, 1.608296);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][6], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][6], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][6], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][6], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][6], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][6], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][6], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][6]);
Textdraw2[playerid][7] = CreatePlayerTextDraw(playerid, 183.333343, 333.925964, "~p~Missions: (And /jobhelp)");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][7], 0.314999, 1.608296);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][7], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][7], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][7], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][7], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][7], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][7], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][7], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][7]);
Textdraw2[playerid][8] = CreatePlayerTextDraw(playerid, 182.333297, 298.251831, "~r~-------------------------------------------");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][8], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][8], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][8], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][8], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][8], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][8], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][8], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][8], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][8]);
Textdraw2[playerid][9] = CreatePlayerTextDraw(playerid, 182.000061, 323.140808, "~r~-------------------------------------------");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][9], 0.449999, 1.600000);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][9], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][9], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][9], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][9], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][9], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][9], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][9], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][9]);
Textdraw2[playerid][10] = CreatePlayerTextDraw(playerid, 181.999969, 349.688812, "~y~-Kill the others players.");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][10], 0.362333, 1.521185);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][10], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][10], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][10], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][10], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][10], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][10], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][10], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][10]);
Textdraw2[playerid][11] = CreatePlayerTextDraw(playerid, 182.999954, 363.377746, "~y~-Capture the truck of the Sindacco team to the caligula casino.");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][11], 0.258333, 1.558518);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][11], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][11], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][11], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][11], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][11], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][11], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][11], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][11]);
Textdraw2[playerid][12] = CreatePlayerTextDraw(playerid, 182.666671, 375.407318, "~y~-Save the players of his team to the police headquarters.");
PlayerTextDrawLetterSize(playerid, Textdraw2[playerid][12], 0.282333, 1.620740);
PlayerTextDrawAlignment(playerid, Textdraw2[playerid][12], 1);
PlayerTextDrawColor(playerid, Textdraw2[playerid][12], -1);
PlayerTextDrawSetShadow(playerid, Textdraw2[playerid][12], 0);
PlayerTextDrawSetOutline(playerid, Textdraw2[playerid][12], 1);
PlayerTextDrawBackgroundColor(playerid, Textdraw2[playerid][12], 51);
PlayerTextDrawFont(playerid, Textdraw2[playerid][12], 1);
PlayerTextDrawSetProportional(playerid, Textdraw2[playerid][12], 1);
PlayerTextDrawShow(playerid,Textdraw2[playerid][12]);
return 1;
}
stock DeleteTextdraw(playerid)
{
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][4]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][5]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][6]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][7]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][8]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][9]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][10]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][11]);
PlayerTextDrawDestroy(playerid,Textdraw2[playerid][12]);
return 1;
}
http://hpics.li/a2b0085
http://hpics.li/3927524
In the second screen you can see that the textdraw are not break.
I've been trying to fix it for two hours.
I would like continue to script my server. ^^
Thanks