Raised This Month: $ Target: $400
 0% 

Setting Angles and Origins.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 02-04-2007 , 06:03   Re: Setting Angles and Origins.
Reply With Quote #1

are you sure your code works? i see you just set the origin of the same ent three times.
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 02-04-2007 , 17:28   Re: Setting Angles and Origins.
Reply With Quote #2

Quote:
Originally Posted by jim_yang View Post
are you sure your code works? i see you just set the origin of the same ent three times.
I should of shown part of the full code:
Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> new g_origin[3] new const validents[4][256] = {     "monster_zombie",     "monster_scientist",     "monster_barney",     "monster_sentry" } public plugin_init() {     register_plugin("Circle Test","1.0","")     register_concmd("amx_circle","find_ent2") } public find_ent2(id) {         new random_player = random_num(1,get_playersnum()) //Apprently this always doesn't return true player indexs     if(is_user_connected(random_player) && is_user_alive(random_player))     {         new Float:origin[3],classname[32],ent,i         pev(random_player,pev_origin,origin)         while((ent = engfunc(EngFunc_FindEntityInSphere,ent,origin,10000.0)) != 0 ) {             for(i=0;i<sizeof(validents);i++) {                 pev(ent, pev_classname, classname, 31)                 if(equali(classname,"monster_sentry")) {                     npc_rotate(ent,random_player)                     break;                 }             }         }     }     return PLUGIN_HANDLED }                     public npc_rotate(ent,player) {         new Float:entorigin[3],Float:playerorigin[3],i     pev(ent,pev_origin,entorigin)     pev(player,pev_origin,playerorigin)     g_origin[0] += 30     g_origin[1] += 10     g_origin[2] += 0     for(i=0;i<3;i++) {         playerorigin[i] += g_origin[i]         set_pev(ent,pev_origin,playerorigin)         console_print(0,"[POWER NPC] For called")     }     return PLUGIN_HANDLED }
But yes, tested it and works fine.

@lunarwolfx
There's a total of six monsters (Sentrys) around the player, it's always the same amount, and always in the same place. It's simply suppose to place itself around the player, and spin around the player untill his/her death.
Drak is offline
Send a message via MSN to Drak
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:38.


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