Results 1 to 4 of 4

Thread: How do add custom spawnpoints to a map?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Private
    Join Date
    Apr 2020
    Posts
    66
    Thanks
    28
    Thanked 14 Times in 13 Posts

    How do add custom spawnpoints to a map?

    Hi
    As you can tell from the title i'm trying to add custom spawnpoints to a map.
    PHP Code:
        spawnpointname "mp_dm_spawn";
        
    spawnpoints getentarray(spawnpointname"classname");    

        
    spawnpoints[spawnpoints.size] = spawnStruct();
        
    spawnpoints[spawnpoints.size-1].origin = (1234 ,2068324);
        
    spawnpoints[spawnpoints.size-1].classname "mp_dm_spawn";
        
    spawnpoints[spawnpoints.size-1].angles = (03000);
        
        
    spawnpoints[spawnpoints.size] = spawnStruct();
        
    spawnpoints[spawnpoints.size-1].origin = (2262 ,2835106);
        
    spawnpoints[spawnpoints.size-1].classname "mp_dm_spawn";
        
    spawnpoints[spawnpoints.size-1].angles = (02100); 
    I want to know if this is the propper way to do it. The code above is added to mp_mapname.gsc Also if there is a way to delete spawnpoints.

    PHP Code:
    for( spawnpoints.size i++ )
    {
        if( 
    isSubStrspawnpoints[i].classname "mp_dm_spawn" ) )
            
    spawnpoints[idelete();
            

    I tried adding this before adding my custom spawn points because i wanted to see if they work but then the server skips the map and goes to the next. So i guess the spawnpoints are not added...
    Please help

  2. The Following User Says Thank You to agribilos For This Useful Post:

    kung foo man (24th March 2021)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •