Veteran Member
Join Date: Feb 2016
Location: São Paulo, Brasil
|
08-01-2018
, 17:13
Re: CL_EntityNum
|
#3
|
PHP Code:
new const g_szWeapons[][dWeaponData] = { {"models/w_ak47.mdl", CSW_AK47}, {"models/w_m4a1.mdl", CSW_M4A1}, {"models/w_famas.mdl", CSW_FAMAS}, {"models/w_galil.mdl", CSW_GALIL}, {"models/w_scout.mdl", CSW_SCOUT}, {"models/w_mp5.mdl", CSW_MP5NAVY}, {"models/w_p90.mdl", CSW_P90}, {"models/w_ump45.mdl", CSW_UMP45}, {"models/w_m3.mdl", CSW_M3}, {"models/w_xm1014.mdl", CSW_XM1014}, {"models/w_mac10.mdl", CSW_MAC10}, {"models/w_aug.mdl", CSW_AUG}, {"models/w_sg552.mdl", CSW_SG552}, {"models/w_tmp.mdl", CSW_TMP}, {"models/w_glock18.mdl", CSW_GLOCK18}, {"models/w_usp.mdl", CSW_USP}, {"models/w_elite.mdl", CSW_ELITE}, {"models/w_deagle.mdl", CSW_DEAGLE}, {"models/w_fiveseven.mdl", CSW_FIVESEVEN}, {"models/w_p228.mdl", CSW_P228}, {"models/w_hegrenade.mdl", CSW_HEGRENADE}, {"models/w_flashbang.mdl", CSW_FLASHBANG} }
And
PHP Code:
{"models/w_kevlar.mdl", ITEM_KEVLAR_ID}, {"models/pubg/itens/w_medkit.mdl", ITEM_MEDKIT_ID}, {"models/pubg/itens/w_capacete.mdl", ITEM_HELMET_ID}, {"models/pubg/itens/w_bag.mdl", ITEM_BAG_ID}, {"models/pubg/itens/w_impulsegrenade.mdl", ITEM_IMPULSE_ID}, {"models/pubg/itens/w_scope2x.mdl", ITEM_SCOPE2X_ID}, {"models/pubg/itens/w_scope4x.mdl", ITEM_SCOPE4X_ID}, {"models/w_9mmarclip.mdl", ITEM_PENTEALONGADO_ID}
I'd pick a random origin and I do use these physics to spawn the entity:
PHP Code:
spawnEntity(iEnt, Float:fOrigin[3], szModel[], szClassName[], iUser1, iUser2 = 0, iUser3 = 0) { engfunc(EngFunc_SetOrigin, iEnt, fOrigin) engfunc(EngFunc_SetModel, iEnt, szModel)
static Float:fMaxs[3] = {5.0, 3.0, 6.0} static Float:fMins[3] = {-1.0, -3.0, -6.0} set_pev(iEnt, pev_solid, SOLID_BBOX) set_pev(iEnt, pev_gravity, 1.0) set_pev(iEnt, pev_movetype, MOVETYPE_TOSS) set_pev(iEnt, pev_classname, szClassName) engfunc(EngFunc_SetSize, iEnt, fMins, fMaxs) engfunc(EngFunc_DropToFloor, iEnt)
if(iUser1) { set_pev(iEnt, pev_iuser1, iUser1) } if(iUser2) { set_pev(iEnt, pev_iuser2, iUser2) } if(iUser3) { set_pev(iEnt, pev_iuser3, iUser3) } }
And set_rendering.
__________________
|
|