![]() |
|
Spawn AGAIN WTF?! - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Spawn AGAIN WTF?! (/Thread-Spawn-AGAIN-WTF.html) |
Spawn AGAIN WTF?! - Arteq - 02-28-2011 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));
}
THX, G-Man. RE: Spawn AGAIN WTF?! - iAegle - 02-28-2011 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));
}
RE: Spawn AGAIN WTF?! - Arteq - 02-28-2011 Quote:MAPNAME()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); RE: Spawn AGAIN WTF?! - iAegle - 02-28-2011 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 RE: Spawn AGAIN WTF?! - Arteq - 02-28-2011 ok thx |