pev_weaponmodel2 |
Здравствуйте, гость Вход | Регистрация
Наши новости:
|
|
|
pev_weaponmodel2 |
sigrlunn
|
2.8.2022, 16:44
Сообщение
|
|
|
Здравствуйте! Есть статься про варианты замены модели игрока разными способами.
[TUT-CS] Changing player models and lowering svc_bad Подскажите пожалуйста, если менять через отдельные энтити, то как добавить бомбу и дефуза? Cкрытый текст stock fm_set_weaponmodel_ent( id ) { // Get the player's p_ weapon model static model[100] pev( id, pev_weaponmodel2, model, charsmax( model ) ) // Check if the entity assigned to this player exists if ( !pev_valid(g_ent_weaponmodel[id]) ) { // If it doesn't, proceed to create a new one g_ent_weaponmodel[id] = engfunc( EngFunc_CreateNamedEntity, engfunc( EngFunc_AllocString, "info_target" ) ) // If it failed to create for some reason, at least this will prevent further "Invalid entity" errors... if ( !pev_valid( g_ent_weaponmodel[id] ) ) return; // Set its classname set_pev( g_ent_weaponmodel[id], pev_classname, WEAPONMODEL_CLASSNAME ) // Make it follow the player set_pev( g_ent_weaponmodel[id], pev_movetype, MOVETYPE_FOLLOW ) set_pev( g_ent_weaponmodel[id], pev_aiment, id ) set_pev( g_ent_weaponmodel[id], pev_owner, id ) } // Entity exists now, set its model engfunc( EngFunc_SetModel, g_ent_weaponmodel[id], model ) } Модели и оружие заменяются. Но бомбы и дефуз китов на игроках нету...
Отредактировал: sigrlunn, - 2.8.2022, 16:47
|
|
|
|
![]() ![]() |