Raised This Month: $51 Target: $400
 12% 

Spawn Points


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 07-20-2018 , 09:19   Spawn Points
Reply With Quote #1

Solved Thnx.
__________________

Last edited by Sanjay Singh; 07-24-2018 at 02:29.
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-20-2018 , 09:27   Re: Spawn Points
Reply With Quote #2

Quote:
Originally Posted by Sanjay Singh View Post
Explaination is enough i think.
Pretty informative.

So you want Terrorists to be spawned in origin inside Array1 and Counter-Terrorists in origin inside Array2?
edon1337 is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 07-20-2018 , 09:35   Re: Spawn Points
Reply With Quote #3

Quote:
Originally Posted by edon1337 View Post
Pretty informative.

So you want Terrorists to be spawned in origin inside Array1 and Counter-Terrorists in origin inside Array2?
Yes, I want Ct to spawn at that CT [] array points and vice versa.
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-20-2018 , 09:46   Re: Spawn Points
Reply With Quote #4

Then hook Ham_Spawn, check player's team and set the origin to the one in array?
edon1337 is offline
Sanjay Singh
Veteran Member
Join Date: Sep 2016
Old 07-20-2018 , 10:23   Re: Spawn Points
Reply With Quote #5

Quote:
Originally Posted by edon1337 View Post
Then hook Ham_Spawn, check player's team and set the origin to the one in array?
What the point of asking this thread then? If i know how to spawn a player on specific point.
can you code for me?
__________________
Sanjay Singh is offline
Send a message via AIM to Sanjay Singh
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-20-2018 , 10:27   Re: Spawn Points
Reply With Quote #6

Then you are in the wrong section
__________________
stuff
maqi is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-20-2018 , 10:44   Re: Spawn Points
Reply With Quote #7

Never tried this, so don't know how efficient it is:
PHP Code:
#include < amxmodx >
#include < hamsandwich >
#include < fakemeta >
#include < cstrike >

#pragma semicolon 1

new const Float:CT_SPAWNS[][3] = {
    { -
1024.0, -704.0164.0 },
    { -
1024.0, -896.0175.0 }
};

new const 
Float:T_SPAWNS[][3] = { 
    { 
256.02112.0, -92.0 },
    { 
63.02112.0, -92.0 }
};

public 
plugin_init( ) {
    
register_plugin"Spawn Point""1.0""maqi" );
    
    
RegisterHamHam_Spawn"player""Event_PlayerSpawnPost");
}

public 
Event_PlayerSpawnPostiIndex ) {
    if( !
is_user_aliveiIndex ) )
        return;
        
    if( 
cs_get_user_teamiIndex ) != CS_TEAM_CT && cs_get_user_teamiIndex ) != CS_TEAM_T )
        return;
        
    
engfuncEngFunc_SetOriginiIndexcs_get_user_teamiIndex ) == CS_TEAM_CT CT_SPAWNS[random(sizeof CT_SPAWNS)] : T_SPAWNS[random(sizeof T_SPAWNS)] );

__________________
stuff

Last edited by maqi; 07-20-2018 at 10:53.
maqi is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-20-2018 , 10:51   Re: Spawn Points
Reply With Quote #8

Return values in post callbacks is ignored.

@OP, This won't work properly, because you need to check if the spawn origin is vacant to don't stuck player. Also, you will need to generate spawn points for each map and not use a global for all maps.
__________________









Last edited by CrazY.; 07-20-2018 at 11:10.
CrazY. is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-20-2018 , 10:54   Re: Spawn Points
Reply With Quote #9

Right, It was a pre initially, thanks for catching. (edited)

As for the rest, this is what he requested, so it's up to him to check for everything and find spawn points.
__________________
stuff

Last edited by maqi; 07-20-2018 at 10:55.
maqi is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-20-2018 , 11:53   Re: Spawn Points
Reply With Quote #10

Quote:
Originally Posted by Sanjay Singh View Post
What the point of asking this thread then? If i know how to spawn a player on specific point.
can you code for me?
Why are you posting in Scripting help section when you have no knowledge on Scripting then?
edon1337 is offline
Reply



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:55.


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