ItsMods

Full Version: Spawn AGAIN WTF?!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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()), 22223333));
self setPlayerAngles((0,0,0));
}

doaxis()
{
self setOrigin((1111 - (25 self GetEntityNumber()), 22223333));
self setPlayerAngles((0,0,0));

or any other?
THX, G-Man.
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()
{

}

createSpawnalliesposaxisposalliesangleaxisangle )
{
    if(
self.team == "allies")
    {
        
self setOriginalliespos );
        
self setPlayerAngles alliesangle );
    }
    else 
    {
        
self setOriginaxispos );
        
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((111222333), (555333777), (0090), (0090));

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);
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
ok thx