RSSy MYGO.pl Opublikowano Sierpień 11, 2023 o 18:40 RSSy Udostępnij Opublikowano Sierpień 11, 2023 o 18:40 Hi everyone ! I need help this plugin made by OciXcrom i want to set ADMIN_IMMUNITY for Owner_ct player/owner_ct/owner_ct.mdl and for VIP ADMIN_LEVEL_H // // // vip_ct/vip_ct.mdl But i saw 1 error idk how to fix it Error: Expected token: ":", but found "]" on line 57 PHP Code: #include <amxmodx>#include <cstrike>#include <hamsandwich>#define MODEL_DELAY 0.5enum _:ModelsInfo{ Flag, CTModel[32]}new const g_eModels[][ModelsInfo] ={ // <Admin flag> <CT skin> { ADMIN_IMMUNITY, "owner_ct" }, { ADMIN_LEVEL_H, "vip_ct" }}new Trie:g_tModelspublic plugin_init(){ register_plugin("Multiple Player Models", "1.0", "OciXCrom") RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)}public plugin_precache(){ g_tModels = TrieCreate() for(new i; i < sizeof(g_eModels); i++) { precache_player_model(g_eModels[i][CTModel]) }}public OnPlayerSpawn(id) set_task(MODEL_DELAY, "SetModel", id) public SetModel(id){ if(is_user_alive(id)) { static bool:bMatch, iFlags, i bMatch = false for(iFlags = get_user_flags(id), i = 0; i < sizeof(g_eModels); i++) { if(iFlags & g_eModels[i][Flag]) { switch(cs_get_user_team(id)) { case CS_TEAM_CT: cs_set_user_model(id, g_eModels[i][CTModel]) } client_print(id, print_chat, "* Your received the model %s", g_eModels[i][cs_get_user_team(id) == CS_TEAM_CT ? CTModel ]) bMatch = true break } } if(!bMatch) { static szModel[32] cs_get_user_model(id, szModel, charsmax(szModel)) if(TrieKeyExists(g_tModels, szModel)) cs_reset_user_model(id) } }}precache_player_model(szModel[]){ TrieSetCell(g_tModels, szModel, 1) static szFile[128] formatex(szFile, charsmax(szFile), "models/player/%s/%s.mdl", szModel, szModel) precache_model(szFile) if(file_exists(szFile)) precache_model(szFile)} Przeczytaj cały wpis Odnośnik do komentarza Udostępnij na innych stronach Więcej opcji udostępniania...
Rekomendowane odpowiedzi