Spawn AGAIN WTF?!
#1
Sad 
I need help with spawn AGAIN!!!(

Eekhoorns code for custom spawn points works, but you know, the coordinates I paste to the code are used as spawn points ON ALL MAPS so who knows on some maps i can even spawn in a wall. how can I do DIFFERENT spawnpoints for DIFFERENT maps using this code
PHP Code:
//goes onplayerspawned if(self.team == "allies") self thread doallies(); else if(self.team == "axis") self thread doaxis(); doallies() { //1111,2222,3333 represents the spawn's coordinate, the function automaticly creates other spawnpoints around it so you don't all spawn on the same place, //be sure to take a free area so you don't spawn in a tree close to your spawnpoint self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333)); self setPlayerAngles((0,0,0)); } doaxis() { self setOrigin((1111 - (25 * self GetEntityNumber()), 2222, 3333)); self setPlayerAngles((0,0,0)); }
or any other?
THX, G-Man.
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#2
PHP Code:
doMaps() { if(getDvar("mapname") == "mp_array") { level thread ArrayMap(); } if(getDvar("mapname") == "mp_cairo") { level thread Havana(); } if(getDvar("mapname") == "mp_cosmodrome") { level thread Launch(); } if(getDvar("mapname") == "mp_cracked") { level thread Cracked(); } if(getDvar("mapname") == "mp_crisis") { level thread Crisis(); } if(getDvar("mapname") == "mp_duga") { level thread Grid(); } if(getDvar("mapname") == "mp_firingrange") { level thread FiringRange(); } if(getDvar("mapname") == "mp_hanoi") { level thread Hanoi(); } if(getDvar("mapname") == "mp_havoc") { level thread Jungle(); } if(getDvar("mapname") == "mp_mountain") { level thread Summit(); } if(getDvar("mapname") == "mp_nuked") { level thread NukeTown(); } if(getDvar("mapname") == "mp_radiation") { level thread Radiation(); } if(getDvar("mapname") == "mp_russianbase") { level thread WMD(); } if(getDvar("mapname") == "mp_villa") { level thread Villa(); } } ArrayMap() { } Havana() { } Launch() { } Cracked() { } Crisis() { } Grid() { } FiringRange() { } Hanoi() { } Jungle() { } Summit() { } NukeTown() { } Radiation() { } WMD() { } Villa() { } createSpawn( alliespos, axispos, alliesangle, axisangle ) { if(self.team == "allies") { self setOrigin( alliespos ); self setPlayerAngles ( alliesangle ); } else { self setOrigin( axispos ); self setPlayerAngles ( axisangle ); } }

on Init()
PHP Code:
level thread doMaps();

EDIT:

i think this will work:

here is an example of how to use it:

PHP Code:
MAPNAME() { createSpawn((111, 222, 333), (555, 333, 777), (0, 0, 90), (0, 0, 90)); }
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#3
Quote:MAPNAME()
{
createSpawn((111, 222, 333), (555, 333, 777), (0, 0, 90), (0, 0, 90));
}
i cant understand you. in createSpawn() there must be only two "()" - coordinates and angle. Mb these four "()" are coordinates and angles of alies and axis? BUT THEN IN WHAT RAW do they come?
example:
(ALLIES COOR)(ALLIES ANGLE)(AXIS COOR)(AXIS ANGLE);
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply

#4
yep thats right

createSpawn( (ALLIES COOR), (ALLIES ANGLE), (AXIS COOR), (AXIS ANGLE) );

but nvm it wont work, setOrigin needs to be called every time someone spawns

i'll make a working one but give me some time
(08-10-2011, 12:58)Pozzuh Wrote:
Se7en Wrote:Stealed, from cod4 mod ...
look who's talking

[Release] Old School Mod v2.2
[Release] Scroll menu

Reply

#5
ok thx
[Image: r212360a129ce9b84444093b6cd2699013a1fbn155.png]
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation [Request] Random Weapon At Spawn Scripts18 3 6,804 07-27-2013, 23:53
Last Post: DidUknowiPwn
  Help Spawn Message Playing on Respawn? Killjoy 7 7,340 07-11-2013, 14:53
Last Post: Killjoy
  [Release] Spawn Polygons and Pyramids Yamato 6 6,705 06-20-2013, 12:30
Last Post: Yamato
  Question on how to "Spawn" a flying rocket as a player? akillj 8 8,515 06-04-2013, 01:54
Last Post: rotceh_dnih
  Help pickup mod + spawn fx m4gicaL 1 3,709 03-07-2013, 17:52
Last Post: tadej
  Help No more free spawn influencers! JustDoingThisShit 0 5,796 02-03-2013, 20:21
Last Post: JustDoingThisShit
  W@W: Making player spawn with a custom default class. koil 9 7,549 01-13-2013, 12:10
Last Post: koil
  spawn object SaviouR9966 3 4,058 01-08-2013, 14:31
Last Post: 99IRock
  Help Spawn on predefined points problem islamsaab 2 3,921 09-29-2012, 21:23
Last Post: islamsaab
  Help Spawn Weapon Models Ich1994 3 4,648 07-15-2012, 14:20
Last Post: archit

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2026 Melroy van den Berg.