Raised This Month: $ Target: $400
 0% 

How to find out howmany player(T or CT) spawn point in a map?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 07-03-2006 , 08:59   How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #1

Code:
 new T_spawn = find_ent_by_class ( -1, "info_player_deathmatch" )
//resul: map de_train
T_spawn = 34

It's not correctly. (is 12)

Actuality I want to find out howmany spawn point in a map, and add new spawn point in running time if no enough.

any one help?
jopmako is offline
Send a message via MSN to jopmako
VEN
Veteran Member
Join Date: Jan 2005
Old 07-03-2006 , 09:37   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #2

For example:
PHP Code:
new entmax_tsmax_cts
 
while ((ent find_ent_by_class(ent"info_player_deathmatch")))
    
max_ts++
 
while ((
ent find_ent_by_class(ent"info_player_start")))
    
max_cts++ 
VEN is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 07-03-2006 , 13:35   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #3

Quote:
Originally Posted by VEN
For example:
PHP Code:
new entmax_tsmax_cts
 
while ((ent find_ent_by_class(ent"info_player_deathmatch")))
max_ts++
 
while ((
ent find_ent_by_class(ent"info_player_start")))
max_cts++ 
ok it work ,thanks

Last edited by jopmako; 07-03-2006 at 14:03.
jopmako is offline
Send a message via MSN to jopmako
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-03-2006 , 09:50   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #4

Quote:
Originally Posted by jopmako
Code:
 new T_spawn = find_ent_by_class ( -1, "info_player_deathmatch" )
//resul: map de_train
T_spawn = 34

It's not correctly. (is 12)

Actuality I want to find out howmany spawn point in a map, and add new spawn point in running time if no enough.

any one help?
If you couldn't figure out how to do that, you're going to have a hard time adding more spawns dynamically.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 07-03-2006 , 13:42   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #5

Quote:
Originally Posted by Hawk552
If you couldn't figure out how to do that, you're going to have a hard time adding more spawns dynamically.


Is that have a way to add player spawns in running time?

How to do that?


thanks for your help.
jopmako is offline
Send a message via MSN to jopmako
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-03-2006 , 13:45   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #6

The only way I can think of is to scan around a current spawn and use PointContents to see if there is anything in the spot or within a few units around it. If not, then spawn an info_player_start/_deathmatch.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 07-03-2006 , 14:13   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #7

yeah,find out the spawns is work find now.

If i using create_entity("info_player_deathmatch") to create a spawn point.
It is that meaning the map(22max.player) add to (23max.player)
and player can join?
jopmako is offline
Send a message via MSN to jopmako
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 07-03-2006 , 14:20   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #8

Quote:
Originally Posted by jopmako
yeah,find out the spawns is work find now.

If i using create_entity("info_player_deathmatch") to create a spawn point.
It is that meaning the map(22max.player) add to (23max.player)
and player can join?
Yes, but you can't just create it. You need to give it an origin, otherwise players will spawn at 0,0,0.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 07-03-2006 , 14:37   Re: How to find out howmany player(T or CT) spawn point in a map?
Reply With Quote #9

Quote:
Originally Posted by Hawk552
Yes, but you can't just create it. You need to give it an origin, otherwise players will spawn at 0,0,0.
thanks a lot.
jopmako is offline
Send a message via MSN to jopmako
Reply


Thread Tools
Display Modes

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 08:05.


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