Raised This Month: $ Target: $400
 0% 

Help Me For this please.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
poliisi299
Senior Member
Join Date: May 2011
Old 11-05-2011 , 07:46   Help Me For this please.
Reply With Quote #1

Help me plzz i need plugin.

plugin --> Terrorist can respawn but CT no can.

can someoney give me the plugin

Thank You
poliisi299 is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 11-05-2011 , 07:50   Re: Help Me For this please.
Reply With Quote #2

Check when a player die if he is a Terrorist, and respawn him.
Korxu is offline
poliisi299
Senior Member
Join Date: May 2011
Old 11-05-2011 , 07:52   Re: Help Me For this please.
Reply With Quote #3

Quote:
Originally Posted by Korxu View Post
Check when a player die if he is a Terrorist, and respawn him.
But i wan "T" automatically respawn can help ?
poliisi299 is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 11-05-2011 , 07:59   Re: Help Me For this please.
Reply With Quote #4

PHP Code:
// In plugin_init ( ), add this line.
     
RegisterHam Ham_Killed"player""ham_player_killed")

// Now, create the function.
public ham_player_killed index )
{
     if ( 
cs_get_user_team index ) == CS_TEAM_T )
     {
          
set_pev indexpev_deadflagDEAD_RESPAWNABLE )
          
// Or you can use other method, like this.
          // ExecuteHamB ( Ham_CS_RoundRespawn, index )
     
}


Last edited by Korxu; 11-05-2011 at 08:01. Reason: FIXED
Korxu is offline
poliisi299
Senior Member
Join Date: May 2011
Old 11-05-2011 , 08:03   Re: Help Me For this please.
Reply With Quote #5

Quote:
Originally Posted by Korxu View Post
PHP Code:
// In plugin_init ( ), add this line.
     
RegisterHam Ham_Killed"player""ham_player_killed")
 
// Now, create the function.
public ham_player_killed index )
{
     if ( 
cs_get_user_team index ) == CS_TEAM_T )
     {
          
set_pev indexpev_deadflagDEAD_RESPAWNABLE )
          
// Or you can use other method, like this.
          // ExecuteHamB ( Ham_CS_RoundRespawn, index )
     
}

Thank you but can you send to Sma file ?
poliisi299 is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 11-05-2011 , 08:08   Re: Help Me For this please.
Reply With Quote #6

... you can't create the .sma file and compile it using the webcompiler?

Last edited by Korxu; 11-07-2015 at 16:47.
Korxu is offline
sake
Senior Member
Join Date: Jul 2011
Old 11-05-2011 , 08:18   Re: Help Me For this please.
Reply With Quote #7

Code:
/* * simple spawnPlayer method. spawns player. * credits: * <a href="https://forums.alliedmods.net/showpost.php?p=678294&postcount=19" target="_blank" rel="noopener">https://forums.alliedmods.net/showpo...4&postcount=19</a> */ public spawnPlayer(id) {     // Disconnected, already spawned, or switched to Spectator     if (!is_user_connected(id)     || is_user_alive(id)     || cs_get_user_team(id) == CS_TEAM_SPECTATOR     || cs_get_user_team(id) == CS_TEAM_UNASSIGNED)     {           return;     }     // Try to spawn the player setting the appropiate dead flag and forcing a think     set_pev(id, pev_deadflag, DEAD_RESPAWNABLE);     dllfunc(DLLFunc_Think, id);     // Fix for Bots: DLLFunc_Think won't work on them,     // but DLLFunc_Spawn does the job without any bugs.     if (is_user_bot(id) && pev(id, pev_deadflag) == DEAD_RESPAWNABLE)     {         dllfunc(DLLFunc_Spawn, id);     } }

I am using this one.
__________________
sake is offline
Korxu
Senior Member
Join Date: Sep 2010
Old 11-05-2011 , 08:20   Re: Help Me For this please.
Reply With Quote #8

Is better than use only
PHP Code:
set_pev indexpev_deadflagDEAD_RESPAWNABLE 
or
PHP Code:
ExecuteHamB Ham_CS_RoundRespawnindex 
?

EDIT#
For your code, you can get the user team only one time and compare it to check if the user is spect or unassigned instead of get the user time two times.

Last edited by Korxu; 11-05-2011 at 08:22. Reason: EDIT#
Korxu is offline
poliisi299
Senior Member
Join Date: May 2011
Old 11-05-2011 , 08:29   Re: Help Me For this please.
Reply With Quote #9

Quote:
Originally Posted by Korxu View Post
... you can't create the .sma file and compile it using the webcompiler?
Not work i use this in my zombie plague mod but not work zombie not respawn plzz help me
poliisi299 is offline
poliisi299
Senior Member
Join Date: May 2011
Old 11-05-2011 , 08:30   Re: Help Me For this please.
Reply With Quote #10

and i have zpa 1.6.1 and i use "zp_deathmatch 2" but not work (
poliisi299 is offline
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 14:17.


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