AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   How to create one Ent in a random place of the map? (https://forums.alliedmods.net/showthread.php?t=196428)

pacheco 09-20-2012 17:45

How to create one Ent in a random place of the map?
 
I tried,

PHP Code:

//fakemeta pwns n00bs
new ent engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"));
set_pev(shotpev_classname"custom_class_name");
new 
origin[3] = {0,0,0};
//also you left out a bunch of stuff...
new Float:maxs[3] = {0.2,0.2,0.5};
new 
Float:mins[3] = {-0.2,-0.2,-0.5};
set_pev(entpev_originorigin);
engfunc(EngFunc_SetSizeentminsmaxs); //set size
set_pev(entpev_solidSOLID_BBOX); //make solid
set_pev(entpev_movetypeMOVETYPE_FLYMISSILE); //set movetype
set_pev(entpev_framerate1.0);
set_pev(entpev_rendermode5);
set_pev(entpev_renderamt255.0);
set_pev(entpev_scale1.20);
engfunc(EngFunc_SetModelent"models/model.mdl"); 

Spoiler


http://forums.alliedmods.net/showthread.php?p=500491

but didn't work.. How i can do it? Create one ent in a random place of the map.. (In the ground)

SpeeDeeR 09-21-2012 04:14

Re: How to create one Ent in a random place of the map?
 
http://forums.alliedmods.net/showthr...ht=SsGetOrigin


All times are GMT -4. The time now is 08:16.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.