23.01.2013, 15:29
I have this code.
Its in gui and this is command.
And my problem its this, text3d after replace (gui) is removed and dont be created.
Код:
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ąć."); }
Код:
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ąć."); }