Raised This Month: $ Target: $400
 0% 

Respawn Distance Close to other players!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-15-2009 , 21:08   Respawn Distance Close to other players!
Reply With Quote #1

When playing some co-op map in CS other day , those people who died had to walk all the way back because the spawn points remain the same.
I cant add custom spawn points as they would spawn in other parts like middle of map without even going through it , so I tried making a plugin to work with the custom spawn points.

This plugin is supposed to ONLY ALLOW players to RESPAWN if they are near their teammates , if they spawn elsewhere the plugin will respawn the player near his teammates.

Minimum distance is 1000.
Maximum distance is 1500.

I know it sounds crazy with a lot of bugs if I use this they might spawn even further into the map dont worry about that part yet. Because right now this isnt even working.
Sry my knowledge of <engine> is bad.

PHP Code:
//RegisterHam(Ham_Spawn,"player","spawned")
public spawned(id)
{
 new 
players[32], count
 get_players
(playerscount"fh")
 for(new 
0counti++) //getting all alive players
 
{
  new 
Float:pos[3]
  
entity_get_vector(players[i], EV_VEC_originpos)
  static 
className[64];
  if(
equali(className"info_player_start"))
  
   if (
vector_distance(posequali(className"info_player_start")) > 1000 && vector_distance(posequali(className"info_player_start")) < 1500
   {
    return 
PLUGIN_HANDLED
   
}
   else
   {
    
ExecuteHam(Ham_CS_RoundRespawn,id)
   }
 }

Not completed yet someone pls help I dont know how to allow them to respawn only if they are near teammates. Right now it will continuously respawn players until they are near teammates , thats bad =/
dstopgunner is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-15-2009 , 21:09   Re: Respawn Distance Close to other players!
Reply With Quote #2

Sorry I forgotton its not only info_player_start , pls dont make this team-specific becuase terrorists too in the game.
dstopgunner is offline
dstopgunner
Senior Member
Join Date: Oct 2007
Old 05-16-2009 , 01:51   Re: Respawn Distance Close to other players!
Reply With Quote #3

Someone pls help I need it urgent.
+Karma for help
dstopgunner 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 01:34.


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