Quote:
Originally Posted by TheArcher
Pretty cool. But this was iPleomax's idea. ![Cheesy](images/smilies/biggrin.png) , good job though and thanks for share
Edit:
You could do
pawn Код:
#if defined FILTERSCRIPT hook OnFilterScriptInit() { for(new i = 0; i < MAX_PLAYERS; i++) { SelectedMenu[i] = -1; SelectedBox[i] = -1; } for(new i = 0; i < MAX_MENUS; i++) { for(new b = 0; b < 4; b++) MenuObjects[i][b] = INVALID_OBJECT_ID; MenuIsExist[i] = false; MenuBoxes[i] = 0; } } hook OnFilterScriptExit() { for(new i = 0; i < MAX_MENUS; i++) { if(MenuIsExist[i]) Destroy3DMenu(i); } } #else hook OnGameModeInit() { for(new i = 0; i < MAX_MENUS; i++) { for(new b = 0; b < 4; b++) MenuObjects[i][b] = INVALID_OBJECT_ID; MenuBoxes[i] = 0; MenuIsExist[i] = false; } } hook OnGameModeExit() { for(new i = 0; i < MAX_MENUS; i++) { if(MenuIsExist[i]) Destroy3DMenu(i); } } #endif
A better method to check before hooking.
|
Yes, you are right, but when I try to do it on my PC, this doesn't work.....