LondoN eXtream 110 Posted April 1, 2015 Share Posted April 1, 2015 (edited) Pentru a se modifica modelul unui player vom avea nevoie de cstrike deci trecem in cod-ul nostru: #include <cstrike> Acum vom face 2 variabile (CT & T) prin care vom arata unde este pus modelul new t_admin[512] = "models/player/admin/admin.mdl" new ct_admin[512] = "models/player/admin_ct/admin_ct.mdl" 512 - Numarul de caractere. Vom inregistra un nou event in public plugin_init anume: register_logevent("ResetHUD", "iModel", "b") In public plugin_precache adaugam: precache_model(t_admin) precache_model(ct_admin) De aici, serverul va descarca modelele necesare. Acum nu ne mai ramane decat sa schimbam modelele, cu ajutorul librariei cstrike public iPlayer(id) { if(get_user_flags(id) & ADMIN_KICK) // Verifica daca userul are acces la kick { new CsTeams:userTeam = cs_get_user_team(id) if(userTeam = CS_TEAM_T) { cs_set_user_model(id, admin) // adica admin.mdl } if(userTeam = CS_TEAM_CT) { cs_set_user_model(id, admin_ct) // adica admin_ct.mdl } else { cs_reset_user_model(id) } } } Edited April 1, 2015 by dK^aL3X 1 Link to comment Share on other sites More sharing options...
Recommended Posts