Short Pallet

Short Pallet 1.2

Нет прав для скачивания
  • Автор темы Автор темы MayroN
  • Дата начала Дата начала

MayroN

Моделлер
Проверенный
Сообщения
47
Реакции
24
Баллы
8
C-подобный:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Short Pallet"
#define VERSION "1.1"
#define AUTHOR "www.effexo.net"

new const g_szPalletModel[] = "models/pallet.mdl"

public plugin_precache() {
    register_plugin(PLUGIN, VERSION, AUTHOR)

    new szMapName[9]
    get_mapname(szMapName, charsmax(szMapName))
    if(equal(szMapName, "de_dust2")) {
        precache_model(g_szPalletModel)

        createPalletEntity()
    }
}

createPalletEntity() {
    new iPalletEntityIndex = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));

    if(!pev_valid(iPalletEntityIndex))
        return

    set_pev(iPalletEntityIndex, pev_classname, "short_pallet"); // exclude from the def ents

    new const Float: fPalletOrigin[3] = {578.92, 2367.28, 74.03}
    engfunc(EngFunc_SetOrigin, iPalletEntityIndex, fPalletOrigin)

    engfunc(EngFunc_SetModel, iPalletEntityIndex, g_szPalletModel)

    set_pev(iPalletEntityIndex, pev_solid, SOLID_BBOX)

    new const Float:fPalletAngle[3] = {0.0, 90.0, 45.0};
    set_pev(iPalletEntityIndex, pev_angles, fPalletAngle)

    new const Float: fMins[3] = {-30.0, -23.0, -25.0}
    new const Float: fMaxs[3] = {10.0, 20.0, 6.0}
    engfunc(EngFunc_SetSize, iPalletEntityIndex, fMins, fMaxs)
}
 

Вложения

@Kurtis,
Понял Вас Сер
Минимализм приветствуется,будем переоформлять
Но...уже завтра
 
@Kurtis,
Понял Вас Сер
Минимализм приветствуется,будем переоформлять
Но...уже завтра
Просто лишнее было.
+Косметика.

Было:
sp.png

Стало:
sp_fix.png

TE_BOX для наглядности. Как минимум +физика.
 
Add a pallet to the mid short (per box)
sp_src.png

C-подобный:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN "Short Pallet"
#define VERSION "1.2"
#define AUTHOR "www.effexo.net"

new const g_szPalletModel[] = "models/pallet.mdl"

public plugin_precache() {
    register_plugin(PLUGIN, VERSION, AUTHOR)

    new szMapName[9]
    get_mapname(szMapName, charsmax(szMapName))
    if(equal(szMapName, "de_dust2")) {
        precache_model(g_szPalletModel)

        createPalletCtShort();
        createPalletMidShort_1();
        createPalletMidShort_2();
    }
}

public createPalletCtShort() {
    new const Float: fPalletOrigin[3] = {578.0, 2367.0, 74.0};
    new const Float: fPalletAngle[3] = {0.0, 90.0, 45.0};
    new const Float: fMins[3] = {-30.0, -23.0, -25.0}
    new const Float: fMaxs[3] = {10.0, 20.0, 6.0}

    createPalletEntity(fPalletOrigin, fPalletAngle, fMins, fMaxs);
}

public createPalletMidShort_1() {
    new const Float: fPalletOrigin[3] = {-287.0, 1359.0, -94.0};
    new const Float: fPalletAngle[3] = {60.0, 0.0, 0.0};
    new const Float: fMins[3] = {0.0, -25.0, -32.0}
    new const Float: fMaxs[3] = {28.0, 17.0, 10.0}

    createPalletEntity(fPalletOrigin, fPalletAngle, fMins, fMaxs);
}

public createPalletMidShort_2() {
    new const Float: fPalletOrigin[3] = {-287.0, 1445.0, 3.0};
    new const Float: fPalletAngle[3] = {40.0, 0.0, 0.0};
    new const Float: fMins[3] = {0.0, -26.0, -35.0}
    new const Float: fMaxs[3] = {30.0, 25.0, 0.0}

    createPalletEntity(fPalletOrigin, fPalletAngle, fMins, fMaxs);
}

createPalletEntity(const Float: fOrigin[3], const Float: fAngle[3], const Float: fMins[3], const Float: fMaxs[3]) {
    new iPalletEntityIndex = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString, "info_target"));

    if(!pev_valid(iPalletEntityIndex))
        return

    engfunc(EngFunc_SetOrigin, iPalletEntityIndex, fOrigin)
    engfunc(EngFunc_SetModel, iPalletEntityIndex, g_szPalletModel)

    set_pev(iPalletEntityIndex, pev_classname, "short_pallet"); // exclude from the def ents
    set_pev(iPalletEntityIndex, pev_solid, SOLID_BBOX)
    set_pev(iPalletEntityIndex, pev_angles, fAngle)

    engfunc(EngFunc_SetSize, iPalletEntityIndex, fMins, fMaxs)
}
C-подобный:
 

Вложения

Кто просматривает тему

Назад
Верх