Problem With Text3D -
Brokenbreaken - 23.01.2013
I have this code.
Код:
if(Player[playerid][PlayerReplaceSp] == 5)
{
GetPlayerPos(playerid,Player[playerid][PlayerPositionX5],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5]);
GetPlayerFacingAngle(playerid,Player[playerid][PlayerPositionA5]);
DeletePlayer3DTextLabel(playerid,Player[playerid][PlayerSp5Text3D]);
Player[playerid][PlayerSp5Text3D] = CreatePlayer3DTextLabel(playerid,"Zapisana Pozycja 5",0x00FF00FF,Player[playerid][PlayerPositionX2],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5],50);
SendClientMessage(playerid,0x00FF00FF,"(Serwer): Twoja pozycja została nadpisana, wpisz /Lp 5 aby się do niej przenieść, lub /Dp 5 aby usunąć.");
}
Its in gui and this is command.
Код:
if(strval(params) == 5)
{
if(Player[playerid][PlayerUseSp5] == 1)
{
Player[playerid][PlayerReplaceSp] = 5;
ShowPlayerDialog(playerid,DIALOG_REPLACE_SP,DIALOG_STYLE_MSGBOX,"Nadpisywanie Zapisanej Pozycji 5","Ta pozycja jest już zapisana, czy na pewno chcesz nią podmienić?","Ok","Anuluj");
return 1;
}
GetPlayerPos(playerid,Player[playerid][PlayerPositionX5],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5]);
GetPlayerFacingAngle(playerid,Player[playerid][PlayerPositionA5]);
Player[playerid][PlayerUseSp5] = 1;
Player[playerid][PlayerSp5Text3D] = CreatePlayer3DTextLabel(playerid,"Zapisana Pozycja 5",0x00FF00FF,Player[playerid][PlayerPositionX5],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5],50);
SendClientMessage(playerid,0x00FF00FF,"(Serwer): Twoja pozycja została zapisana, wpisz /Lp 5 aby się do niej przenieść, lub /Dp 5 aby usunąć.");
}
And my problem its this, text3d after replace (gui) is removed and dont be created.
Re: Problem With Text3D -
Brokenbreaken - 23.01.2013
Any help?
Re: Problem With Text3D -
Shabi RoxX - 23.01.2013
Make sure that your conditions are full fill according to code , If you want to check if condition use else statement with them them print something like "Yeah! playerusesp5 is not 1" OR Something
Re: Problem With Text3D -
Brokenbreaken - 23.01.2013
all of the code to perform but 3dtext is deleted and dont created again.
Re: Problem With Text3D -
Brokenbreaken - 23.01.2013
Any help?
Re: Problem With Text3D -
AphexCCFC - 23.01.2013
You know your code here:
pawn Код:
if(Player[playerid][PlayerReplaceSp] == 5)
{
GetPlayerPos(playerid,Player[playerid][PlayerPositionX5],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5]);
GetPlayerFacingAngle(playerid,Player[playerid][PlayerPositionA5]);
DeletePlayer3DTextLabel(playerid,Player[playerid][PlayerSp5Text3D]);
Player[playerid][PlayerSp5Text3D] = CreatePlayer3DTextLabel(playerid,"Zapisana Pozycja 5",0x00FF00FF,Player[playerid][PlayerPositionX2],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5],50);
SendClientMessage(playerid,0x00FF00FF,"(Serwer): Twoja pozycja została nadpisana, wpisz /Lp 5 aby się do niej przenieść, lub /Dp 5 aby usunąć.");
}
Well I have spotted this
pawn Код:
Player[playerid][PlayerSp5Text3D] = CreatePlayer3DTextLabel(playerid,"Zapisana Pozycja 5",0x00FF00FF,Player[playerid][PlayerPositionX2],Player[playerid][PlayerPositionY5],Player[playerid][PlayerPositionZ5],50);
Here it says:
pawn Код:
Player[playerid][PlayerPositionX2]
Isn't it supposed to be PlayerPositionX5 instead of X2?
Re: Problem With Text3D -
Brokenbreaken - 23.01.2013
Yes thank you for find bug and now all work, thank you all.