Raised This Month: $ Target: $400
 0% 

Spawn to origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-30-2006 , 17:27   Spawn to origin
Reply With Quote #1

Instead of the default origins created by the mapper, spawn elsewhere? How would I do this? And, it's for one map in specific so don't warn me about how it will be messed up if I declare an origin.
__________________
LEWL.
NewUser is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-30-2006 , 19:08  
Reply With Quote #2

This should work
Code:
#define SPAWN_MAX 32 new Float:g_spawn_origin[2][SPAWN_MAX][3] = {     {         {0.0, 0.0, 0.0}, // define your origins for Ts spawn points         // ...         {0.0, 0.0, 0.0}     },     {         {0.0, 0.0, 0.0}, // define your origins for CTs spawn points         // ...         {0.0, 0.0, 0.0}     } } new g_spawn_classname[2][] = {"info_player_deathmatch", "info_player_start"} public plugin_init() {     for (new i = 0; i < 2; ++i) {         new j = -1, k = 0         while ((j = find_ent_by_class(j, g_spawn_classname[i])))             entity_set_origin(j, g_spawn_origin[i][k++])     } }
VEN is offline
NewUser
Member
Join Date: Mar 2006
Location: over there
Old 05-30-2006 , 21:41  
Reply With Quote #3

Tag mismatches on lines 13, 15, 17.

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define SPAWN_MAX 32 #define PLUGIN "plugin" #define version "version" #define author "author" new Float:g_spawn_origin[2][SPAWN_MAX][3] = {     {         {-2692, -2272, -342}, // line 13         {-2191, 2098, -348} // line 15     } } // line 17 new g_spawn_classname[2][] = {"info_player_deathmatch","info_player_start"} public plugin_init() {     register_plugin(PLUGIN,version,author);     for(new i = 0; i < 2; ++i)     {         new j = -1, k = 0         while ((j = find_ent_by_class(j, g_spawn_classname[i])))             entity_set_origin(j, g_spawn_origin[i][k++])     } }
__________________
LEWL.
NewUser is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 05-31-2006 , 11:24  
Reply With Quote #4

You should do it like that:
Code:
#define SPAWN_MAX 2 new Float:g_spawn_origin[2][SPAWN_MAX][3] = {     {         {-2692.0, -2272.0, -342.0}, // T point #1         {-2191.0, 2098.0, -348.0} // T point #2     },     {         {-342.0, 543.0, 933.0}, // CT point #1         {-883.0, 423.0, 783.0} // CT point #2     } }
VEN is offline
Reply


Thread Tools
Display Modes

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 16:23.


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