Raised This Month: $ Target: $400
 0% 

Block Cts from respawning


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-05-2010 , 08:17   Block Cts from respawning
Reply With Quote #1

HI,

This is a method i am using to respawn players ,

PHP Code:
#include <amxmodx>
#include <engine>
#include <fakemeta_util>
#include <hamsandwich>

#define PLUGIN "testn"
#define VERSION "1.0"
#define AUTHOR "sam"

new PcvarProtectionTime
new g_itimeleft[33]
new 
PcvarRespawnTime
const RESPAWNTIME 2
const PROTECTIONTIME 0

public plugin_init() {
    
register_plugin(PLUGINVERSIONAUTHOR)
    
RegisterHamHam_Killed"player""fw_PlayerKilled" )
    
PcvarRespawnTime register_cvar"respawntime""" )
    
set_pcvar_numPcvarRespawnTimeRESPAWNTIME )
    
// Add your code here...
}

public 
fw_PlayerKilled(victimattackershouldgib)
{
    
set_taskget_pcvar_float(PcvarRespawnTime), "PlayerRespawn"victim )
}

public 
PlayerRespawnid )
{
    if( 
is_user_alive(id) )
        return

    
entity_set_int(idEV_INT_deadflagDEAD_RESPAWNABLE)
    
entity_set_int(idEV_INT_iuser10)
    
call_think(id)
    
DispatchSpawn(id)
    
    
fm_set_user_healthid100 )
    
    
g_itimeleft[id] = get_pcvar_numPcvarProtectionTime )
    
    
set_task3.0"PlayerProtection"id )

I want only Terrorists to respawn ... but i cant seem to be able to do that .. , either both ct and T respawn , or neither respawn ... little help , and explain to my how you get it fixed
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 10-05-2010 , 08:27   Re: Block Cts from respawning
Reply With Quote #2

just return if player isnt a terrorist?
PHP Code:
#include <amxmodx> 
#include <engine> 
#include <fakemeta_util> 
#include <hamsandwich> 
#define PLUGIN "testn" 
#define VERSION "1.0" 
#define AUTHOR "sam" 
new PcvarProtectionTime 
new g_itimeleft[33
new 
PcvarRespawnTime 
const RESPAWNTIME 
const PROTECTIONTIME 
public plugin_init() { 
    
register_plugin(PLUGINVERSIONAUTHOR
    
RegisterHamHam_Killed"player""fw_PlayerKilled" 
    
PcvarRespawnTime register_cvar"respawntime""" 
    
set_pcvar_numPcvarRespawnTimeRESPAWNTIME 
    
// Add your code here... 

public 
fw_PlayerKilled(victimattackershouldgib

    
set_taskget_pcvar_float(PcvarRespawnTime), "PlayerRespawn"victim 

public 
PlayerRespawnid 

    if( 
is_user_alive(id) || get_user_team(id) != 
        return 
 
 
    
entity_set_int(idEV_INT_deadflagDEAD_RESPAWNABLE
    
entity_set_int(idEV_INT_iuser10
    
call_think(id
    
DispatchSpawn(id
 
    
fm_set_user_healthid100 
 
    
g_itimeleft[id] = get_pcvar_numPcvarProtectionTime 
 
    
set_task3.0"PlayerProtection"id 

nnajko is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-05-2010 , 08:34   Re: Block Cts from respawning
Reply With Quote #3

are you answering my question , or are you guessing the answer ... or are you asking me a question about my question?
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN is offline
nnajko
Senior Member
Join Date: May 2009
Location: Sweden
Old 10-05-2010 , 08:41   Re: Block Cts from respawning
Reply With Quote #4

Quote:
Originally Posted by SaM.ThE.MaN View Post
are you answering my question , or are you guessing the answer ... or are you asking me a question about my question?
Ehm, I answered your question. return if the player isnt a terrorist. Which I fixed in the code
nnajko is offline
SaM.ThE.MaN
Senior Member
Join Date: Jan 2010
Old 10-05-2010 , 09:40   Re: Block Cts from respawning
Reply With Quote #5

oh i c .... thats how its done
__________________
  • Project : Level Plugin
o [||||||||||] - 100%
  • Project : OnePieceMod
o [||||||||||] - 20%
SaM.ThE.MaN 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 10:24.


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