About TextDrawHideForPlayer -
ChuckyBabe - 31.03.2015
Hello iam trying to hide a textdraw for my script here's the textdraws..
Code:
MainMenuTxtdraw[0] = TextDrawCreate(315.000000, 26.000000, "Irish Verse Roleplay PH");
TextDrawAlignment(MainMenuTxtdraw[0], 2);
TextDrawBackgroundColor(MainMenuTxtdraw[0], 255);
TextDrawFont(MainMenuTxtdraw[0], 3);
TextDrawLetterSize(MainMenuTxtdraw[0], 0.949999, 3.199999);
TextDrawColor(MainMenuTxtdraw[0], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[0], 1);
TextDrawSetProportional(MainMenuTxtdraw[0], 1);
MainMenuTxtdraw[1] = TextDrawCreate(639.000000, -1.000000, "'");
TextDrawAlignment(MainMenuTxtdraw[1], 3);
TextDrawBackgroundColor(MainMenuTxtdraw[1], 255);
TextDrawFont(MainMenuTxtdraw[1], 3);
TextDrawLetterSize(MainMenuTxtdraw[1], 0.239999, 10.900000);
TextDrawColor(MainMenuTxtdraw[1], 255);
TextDrawSetOutline(MainMenuTxtdraw[1], 0);
TextDrawSetProportional(MainMenuTxtdraw[1], 1);
TextDrawSetShadow(MainMenuTxtdraw[1], 1);
TextDrawUseBox(MainMenuTxtdraw[1], 1);
TextDrawBoxColor(MainMenuTxtdraw[1], 255);
TextDrawTextSize(MainMenuTxtdraw[1], 102.000000, 330.000000);
MainMenuTxtdraw[2] = TextDrawCreate(679.000000, 100.000000, "'");
TextDrawAlignment(MainMenuTxtdraw[2], 3);
TextDrawBackgroundColor(MainMenuTxtdraw[2], 255);
TextDrawFont(MainMenuTxtdraw[2], 3);
TextDrawLetterSize(MainMenuTxtdraw[2], 0.340000, 0.100001);
TextDrawColor(MainMenuTxtdraw[2], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[2], 0);
TextDrawSetProportional(MainMenuTxtdraw[2], 1);
TextDrawSetShadow(MainMenuTxtdraw[2], 1);
TextDrawUseBox(MainMenuTxtdraw[2], 1);
TextDrawBoxColor(MainMenuTxtdraw[2], 0x2641FEAA);
TextDrawTextSize(MainMenuTxtdraw[2], 102.000000, 349.000000);
MainMenuTxtdraw[3] = TextDrawCreate(312.000000, 55.000000, SERVER_VERSION);
TextDrawAlignment(MainMenuTxtdraw[3], 2);
TextDrawBackgroundColor(MainMenuTxtdraw[3], 255);
TextDrawFont(MainMenuTxtdraw[3], 3);
TextDrawLetterSize(MainMenuTxtdraw[3], 0.670000, 2.299998);
TextDrawColor(MainMenuTxtdraw[3], -1);
TextDrawSetOutline(MainMenuTxtdraw[3], 0);
TextDrawSetProportional(MainMenuTxtdraw[3], 1);
TextDrawSetShadow(MainMenuTxtdraw[3], 5);
MainMenuTxtdraw[4] = TextDrawCreate(639.000000, 339.000000, "'");
TextDrawAlignment(MainMenuTxtdraw[4], 3);
TextDrawBackgroundColor(MainMenuTxtdraw[4], 255);
TextDrawFont(MainMenuTxtdraw[4], 3);
TextDrawLetterSize(MainMenuTxtdraw[4], 0.239999, 11.900000);
TextDrawColor(MainMenuTxtdraw[4], 255);
TextDrawSetOutline(MainMenuTxtdraw[4], 0);
TextDrawSetProportional(MainMenuTxtdraw[4], 1);
TextDrawSetShadow(MainMenuTxtdraw[4], 1);
TextDrawUseBox(MainMenuTxtdraw[4], 1);
TextDrawBoxColor(MainMenuTxtdraw[4], 255);
TextDrawTextSize(MainMenuTxtdraw[4], 102.000000, 330.000000);
MainMenuTxtdraw[5] = TextDrawCreate(679.000000, 338.000000, "'");
TextDrawAlignment(MainMenuTxtdraw[5], 3);
TextDrawBackgroundColor(MainMenuTxtdraw[5], 255);
TextDrawFont(MainMenuTxtdraw[5], 3);
TextDrawLetterSize(MainMenuTxtdraw[5], 0.340000, 0.100001);
TextDrawColor(MainMenuTxtdraw[5], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[5], 0);
TextDrawSetProportional(MainMenuTxtdraw[5], 1);
TextDrawSetShadow(MainMenuTxtdraw[5], 1);
TextDrawUseBox(MainMenuTxtdraw[5], 1);
TextDrawBoxColor(MainMenuTxtdraw[5], 0x2641FEAA);
TextDrawTextSize(MainMenuTxtdraw[5], 102.000000, 349.000000);
new newsstring[128];
format(newsstring, sizeof(newsstring), "News: %s", GlobalMOTD);
MainMenuTxtdraw[6] = TextDrawCreate(322.000000, 355.000000, newsstring);
TextDrawAlignment(MainMenuTxtdraw[6], 2);
TextDrawBackgroundColor(MainMenuTxtdraw[6], 255);
TextDrawFont(MainMenuTxtdraw[6], 3);
TextDrawLetterSize(MainMenuTxtdraw[6], 0.500000, 2.499999);
TextDrawColor(MainMenuTxtdraw[6], -1);
TextDrawSetOutline(MainMenuTxtdraw[6], 0);
TextDrawSetProportional(MainMenuTxtdraw[6], 1);
TextDrawSetShadow(MainMenuTxtdraw[6], 1);
MainMenuTxtdraw[7] = TextDrawCreate(313.000000, 383.000000, "Players online:");
TextDrawAlignment(MainMenuTxtdraw[7], 2);
TextDrawBackgroundColor(MainMenuTxtdraw[7], 255);
TextDrawFont(MainMenuTxtdraw[7], 3);
TextDrawLetterSize(MainMenuTxtdraw[7], 0.600000, 2.600000);
TextDrawColor(MainMenuTxtdraw[7], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[7], 0);
TextDrawSetProportional(MainMenuTxtdraw[7], 1);
TextDrawSetShadow(MainMenuTxtdraw[7], 1);
MainMenuTxtdraw[8] = TextDrawCreate(77.000000, 414.000000, "Website:");
TextDrawBackgroundColor(MainMenuTxtdraw[8], 255);
TextDrawFont(MainMenuTxtdraw[8], 3);
TextDrawLetterSize(MainMenuTxtdraw[8], 0.469999, 2.199999);
TextDrawColor(MainMenuTxtdraw[8], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[8], 0);
TextDrawSetProportional(MainMenuTxtdraw[8], 1);
TextDrawSetShadow(MainMenuTxtdraw[8], 1);
MainMenuTxtdraw[9] = TextDrawCreate(144.000000, 414.000000, WEBSITE);
TextDrawBackgroundColor(MainMenuTxtdraw[9], 255);
TextDrawFont(MainMenuTxtdraw[9], 3);
TextDrawLetterSize(MainMenuTxtdraw[9], 0.469999, 2.199999);
TextDrawColor(MainMenuTxtdraw[9], -1);
TextDrawSetOutline(MainMenuTxtdraw[9], 0);
TextDrawSetProportional(MainMenuTxtdraw[9], 1);
TextDrawSetShadow(MainMenuTxtdraw[9], 1);
MainMenuTxtdraw[10] = TextDrawCreate(317.000000, 414.000000, "Teamspeak:");
TextDrawBackgroundColor(MainMenuTxtdraw[10], 255);
TextDrawFont(MainMenuTxtdraw[10], 3);
TextDrawLetterSize(MainMenuTxtdraw[10], 0.469999, 2.199999);
TextDrawColor(MainMenuTxtdraw[10], 0x2641FEAA);
TextDrawSetOutline(MainMenuTxtdraw[10], 0);
TextDrawSetProportional(MainMenuTxtdraw[10], 1);
TextDrawSetShadow(MainMenuTxtdraw[10], 1);
MainMenuTxtdraw[11] = TextDrawCreate(406.000000, 414.000000, TEAMSPEAK);
//MainMenuTxtdraw[11] = TextDrawCreate(398.000000, 414.000000, "Will be online soon");
TextDrawBackgroundColor(MainMenuTxtdraw[11], 255);
TextDrawFont(MainMenuTxtdraw[11], 3);
TextDrawLetterSize(MainMenuTxtdraw[11], 0.469999, 2.199999);
TextDrawColor(MainMenuTxtdraw[11], -1);
TextDrawSetOutline(MainMenuTxtdraw[11], 0);
TextDrawSetProportional(MainMenuTxtdraw[11], 1);
TextDrawSetShadow(MainMenuTxtdraw[11], 1);
So now iam trying to hide this with this code
Code:
TextDrawHideForPlayer(playerid, MainMenuTxtdraw[0]);
I know that MainMenuTxtdraw[0] the number "0" is that txtdraw id but everytime i put it in this...
Code:
else if(dialogid == REGISTRATION_SKIPTUT)
{
if(response)
{
PlayerInfo[playerid][pTut] = 1;
SetPlayerPos(playerid, 2212.61, -1730.57, -80.0);
SetPlayerCameraPos(playerid, 2208.67, -1733.71, 27.48);
SetPlayerCameraLookAt(playerid, 2225.25, -1723.1, 13.56);
TogglePlayerControllable(playerid,0);
for(new t = 0; t < 11; t++)
{
TextDrawShowForPlayer(playerid, TutTxtDraw[t]);
}
TutorialProgress[playerid] = 1;
SetTimerEx("TutorialProgression", 14500, 0, "d", playerid);
}
else
{
for(new t = 0; t < 54; t++)
{
TextDrawHideForPlayer(playerid, TutTxtDraw[t]);
}
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, 852.477905, -1439.473876, 15.043654);
SetPlayerFacingAngle(playerid, 171.05);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, MainMenuTxtdraw[0]);
InsideTut[playerid] = 0;
DeletePVar(playerid, "MedicBill");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
PlayerInfo[playerid][pTut] = 1;
PlayerInfo[playerid][pSex] = 1;
PlayerInfo[playerid][pAge] = 25;
PlayerInfo[playerid][pSkin] = 299;
SetPlayerSkin(playerid, 299);
ClearChatbox(playerid);
new string[128];
format(string, sizeof(string), "Welcome to Irish Verse Roleplay PH, %s.", GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_NEWS, string);
format(string, sizeof(string), "~w~Welcome~n~~y~%s", GetPlayerNameEx(playerid));
GameTextForPlayer(playerid, string, 5000, 1);
SendClientMessage(playerid, COLOR_YELLOW, "If you have any further questions, please use /newb. You can also /report if you see any rule-breakers.");
SendClientMessage(playerid, COLOR_GREY, "Use /usecoupon to be a Gold Donator for 7 Days.");
SendClientMessage(playerid, COLOR_REALRED, "If you wish to remove the textdraw. Please Relogin.");
ShowPlayerDialogEx(playerid, DIALOG_REFUND2, DIALOG_STYLE_LIST,"Irish Verse Roleplay PH - \ages","Starter Refund","Read", "");
new motdstring[128];
format(motdstring, sizeof(motdstring), "News: %s", GlobalMOTD);
SendClientMessage(playerid, COLOR_WHITE, motdstring);
DeletePVar(playerid, "IsFrozen");
TutorialProgress[playerid] = 0;
}
}
Iam always having this 5 errors
Code:
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(634) : error 020: invalid symbol name ""
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(9462) : error 017: undefined symbol "MainMenuTxtdraw"
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(9462) : warning 215: expression has no effect
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(9462) : error 001: expected token: ";", but found "]"
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(9462) : error 029: invalid expression, assumed zero
C:\Users\Windows7\Desktop\Microsoft Corporation ©\Irish Verse\gamemodes\PRP-2.pwn(9462) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Errors.
How to hide it without any errors in return ?
+1 rep for those who can help me..
Respuesta: About TextDrawHideForPlayer -
JuanStone - 31.03.2015
In this code there is no error, perhaps you are placing evil in the callback, place as well:
PHP Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
/*if(dialogid == other_dialog)
{
}*/
if(dialogid == REGISTRATION_SKIPTUT)
{
if(response)
{
PlayerInfo[playerid][pTut] = 1;
SetPlayerPos(playerid, 2212.61, -1730.57, -80.0);
SetPlayerCameraPos(playerid, 2208.67, -1733.71, 27.48);
SetPlayerCameraLookAt(playerid, 2225.25, -1723.1, 13.56);
TogglePlayerControllable(playerid,0);
for(new t = 0; t < 11; t++)
{
TextDrawShowForPlayer(playerid, TutTxtDraw[t]);
}
TutorialProgress[playerid] = 1;
SetTimerEx("TutorialProgression", 14500, 0, "d", playerid);
}
else
{
for(new t = 0; t < 54; t++)
{
TextDrawHideForPlayer(playerid, TutTxtDraw[t]);
}
SetPlayerInterior(playerid, 0);
SetPlayerVirtualWorld(playerid, 0);
TogglePlayerControllable(playerid, 1);
SetPlayerPos(playerid, 852.477905, -1439.473876, 15.043654);
SetPlayerFacingAngle(playerid, 171.05);
SetCameraBehindPlayer(playerid);
TextDrawHideForPlayer(playerid, MainMenuTxtdraw[0]);
InsideTut[playerid] = 0;
DeletePVar(playerid, "MedicBill");
SetPlayerColor(playerid,TEAM_HIT_COLOR);
PlayerInfo[playerid][pTut] = 1;
PlayerInfo[playerid][pSex] = 1;
PlayerInfo[playerid][pAge] = 25;
PlayerInfo[playerid][pSkin] = 299;
SetPlayerSkin(playerid, 299);
ClearChatbox(playerid);
new string[128];
format(string, sizeof(string), "Welcome to Irish Verse Roleplay PH, %s.", GetPlayerNameEx(playerid));
SendClientMessage(playerid, COLOR_NEWS, string);
format(string, sizeof(string), "~w~Welcome~n~~y~%s", GetPlayerNameEx(playerid));
GameTextForPlayer(playerid, string, 5000, 1);
SendClientMessage(playerid, COLOR_YELLOW, "If you have any further questions, please use /newb. You can also /report if you see any rule-breakers.");
SendClientMessage(playerid, COLOR_GREY, "Use /usecoupon to be a Gold Donator for 7 Days.");
SendClientMessage(playerid, COLOR_REALRED, "If you wish to remove the textdraw. Please Relogin.");
ShowPlayerDialogEx(playerid, DIALOG_REFUND2, DIALOG_STYLE_LIST,"Irish Verse Roleplay PH - \ages","Starter Refund","Read", "");
new motdstring[128];
format(motdstring, sizeof(motdstring), "News: %s", GlobalMOTD);
SendClientMessage(playerid, COLOR_WHITE, motdstring);
DeletePVar(playerid, "IsFrozen");
TutorialProgress[playerid] = 0;
}
}
/*if(dialogid == other_dialog)
{
}*/
return true;
}
What is the other error ?. In the code there is only one, show the other, perhaps there is the solution.