Raised This Month: $ Target: $400
 0% 

Respawn Round(Solved, Thx Exolent)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-30-2008 , 17:29   Respawn Round(Solved, Thx Exolent)
Reply With Quote #1

Hi friend I need some help.

I need that this respawn only work 10 seconds in the round start.

PHP Code:
public death_msg() 
{  
 {
  new 
vIndex read_data(2
  new 
svIndex[2]
  
svIndex[0] = vIndex
  set_task
(2.0,"respawn",0,svIndex,2
 } 
 return 
PLUGIN_CONTINUE 

public 
respawn(svIndex[]) 

 new 
vIndex svIndex[0
 if(
get_user_team(vIndex) == || is_user_alive(vIndex)) 
  return 
PLUGIN_CONTINUE 
 spawn
(vIndex
 
 return 
PLUGIN_CONTINUE    

__________________

Last edited by AntiBots; 07-31-2008 at 18:21.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Old 07-30-2008, 18:18
hleV
This message has been deleted by hleV.
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-30-2008 , 18:21   Re: Respawn Round
Reply With Quote #2

Is a player die in 10 second of the spawn, he respawn in 5 seconds
__________________

Last edited by AntiBots; 07-30-2008 at 18:24.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-30-2008 , 19:45   Re: Respawn Round
Reply With Quote #3

hleV If you do plis put:
PHP Code:
cs_set_user_deathsidcs_get_user_deathsid ) + 
__________________

Last edited by AntiBots; 07-30-2008 at 19:47. Reason: +
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-30-2008 , 23:33   Re: Respawn Round
Reply With Quote #4

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> #define RESPAWN_TIME 10.0 enum CsTeams {     CS_TEAM_UNASSIGNED = 0,     CS_TEAM_T,     CS_TEAM_CT,     CS_TEAM_SPECTATOR }; #define OFFSET_TEAM 114 #define OFFSET_DEATHS 444 #define cs_get_user_team(%1) get_pdata_int(%1, OFFSET_TEAM) #define cs_get_user_deaths(%1) get_pdata_int(%1, OFFSET_DEATHS) new bool:g_is_dead[33]; new bool:g_can_respawn; new g_msgid_ScoreInfo; public plugin_init() {     register_plugin("Respawn", "0.1", "Exolent");         RegisterHam(Ham_Killed, "player", "FwdPlayerDeath", 1);     RegisterHam(Ham_Spawn, "player", "FwdPlayerSpawn", 1);         register_logevent("EventRoundStart", 2, "1=Round_Start");         g_msgid_ScoreInfo = get_user_msgid("ScoreInfo"); } public client_putinserver(plr) {     g_is_dead[plr] = true;         set_task(5.0, "TaskCheckAlive", plr); } public client_disconnect(plr) {     remove_task(plr); } public TaskCheckAlive(plr) {     if( !g_can_respawn )     {         return;     }         new CsTeams:team = cs_get_user_team(plr);     if( team == CS_TEAM_UNASSIGNED || team == CS_TEAM_SPECTATOR )     {         set_task(1.0, "TaskCheckAlive", plr);                 return;     }         if( g_is_dead[plr] )     {         ExecuteHamB(Ham_CS_RoundRespawn, plr);     } } public FwdPlayerDeath(plr) {     g_is_dead[plr] = true;         set_task(0.1, "TaskCheckAlive", plr);         cs_set_user_deaths(plr, cs_get_user_deaths(plr) - 1); } public FwdPlayerSpawn(plr) {     if( is_user_alive(plr) && g_is_dead[plr] )     {         g_is_dead[plr] = false;     } } public EventRoundStart() {     g_can_respawn = true;         remove_task(123456);     set_task(RESPAWN_TIME * 60.0, "TaskDisableRespawn", 123456); } public TaskDisableRespawn() {     g_can_respawn = false; } cs_set_user_deaths(plr, deaths) {     set_pdata_int(plr, OFFSET_DEATHS, deaths);         new Float:frags;     pev(plr, pev_frags, frags);     Make_ScoreInfo(plr, floatround(frags), deaths, _, _:cs_get_user_team(plr)); } Make_ScoreInfo(plr, frags, deaths, classid=0, team) {     message_begin(MSG_ALL, g_msgid_ScoreInfo);     write_byte(plr);     write_short(frags);     write_short(deaths);     write_short(classid);     write_short(team);     message_end(); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!

Last edited by Exolent[jNr]; 07-31-2008 at 03:32.
Exolent[jNr] is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-31-2008 , 00:23   Re: Respawn Round
Reply With Quote #5

Thank Exolent, but I have a problem.
I want to add:
PHP Code:
cs_set_user_deathsplrcs_get_user_deathsplr ) + 
</SPAN></SPAN>

But when I put the cstrike module the plugin give wrong thinks.

Posible to FIX.
+Karma Exolent The plugin work
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-31-2008 , 01:34   Re: Respawn Round
Reply With Quote #6

It will already add a death to the player since he dies then respawns.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-31-2008 , 01:49   Re: Respawn Round
Reply With Quote #7

When a player die he got a death. I need to disable that score.
You stand me?
__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-31-2008 , 01:59   Re: Respawn Round
Reply With Quote #8

Fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 07-31-2008 , 02:28   Re: Respawn Round
Reply With Quote #9

Thank You Are one of the best

But i can compiler
Attached Thumbnails
Click image for larger version

Name:	error.JPG
Views:	185
Size:	41.0 KB
ID:	29606  
__________________

Last edited by AntiBots; 07-31-2008 at 02:34.
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 07-31-2008 , 03:33   Re: Respawn Round
Reply With Quote #10

Sorry, just a typo. Fixed.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 05:33.


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