Это нормально?
Если я очень быстро создаю и удаляю PTD, то через N-время они вообще перестают удаляться.
код:
#include <a_samp> #include <sscanf2> #include <dc_cmd> #define PTD_MAX_TEST_BOX 25 #define PTD_MAX_TEST_BOX_2 25 new PlayerText:PTD_test_box[MAX_PLAYERS][PTD_MAX_TEST_BOX]; new PlayerText:PTD_test_box_2[MAX_PLAYERS][PTD_MAX_TEST_BOX_2]; { ResetVar(playerid); return 1; } { if(newkeys & KEY_YES) { cmd::showbox(playerid); return 1; } if(newkeys & KEY_NO) { cmd::showbox2(playerid); return 1; } return 1; } new bool:isBox; new bool:isBox_2; CMD:showbox(playerid) { if(isBox_2) { isBox_2 = false; DestroyTestBox2PTD(playerid); } if(!isBox) { isBox = true; CreateTestBoxPTD(playerid); ShowTestBoxPTD(playerid); } return 1; } CMD:showbox2(playerid) { if(isBox) { isBox = false; DestroyTestBoxPTD(playerid); } if(!isBox_2) { isBox_2 = true; CreateTestBox2PTD(playerid); ShowTestBox2PTD(playerid); } return 1; } stock ResetVar(playerid) { for(new i = 0; i < PTD_MAX_TEST_BOX; i++) PTD_test_box[playerid][i] = PlayerText:INVALID_TEXT_DRAW; for(new i = 0; i < PTD_MAX_TEST_BOX_2; i++) PTD_test_box_2[playerid][i] = PlayerText:INVALID_TEXT_DRAW; } stock CreateTestBoxPTD(playerid) { } stock ShowTestBoxPTD(playerid) { for(new i = 0; i < PTD_MAX_TEST_BOX; i++) } stock DestroyTestBoxPTD(playerid) { for(new i = 0; i < PTD_MAX_TEST_BOX; i++) { //PlayerTextDrawHide(playerid, PTD_test_box[playerid][i]); PTD_test_box[playerid][i] = PlayerText:INVALID_TEXT_DRAW; } } stock CreateTestBox2PTD(playerid) { } stock ShowTestBox2PTD(playerid) { for(new i = 0; i < PTD_MAX_TEST_BOX_2; i++) } stock DestroyTestBox2PTD(playerid) { for(new i = 0; i < PTD_MAX_TEST_BOX_2; i++) { //PlayerTextDrawHide(playerid, PTD_test_box_2[playerid][i]); PTD_test_box_2[playerid][i] = PlayerText:INVALID_TEXT_DRAW; } }