Raised This Month: $51 Target: $400
 12% 

Trop tard = Slay


  
 
 
Thread Tools Display Modes
Author Message
Electroo
Senior Member
Join Date: Jun 2012
Old 07-26-2012 , 07:33   Trop tard = Slay
#1

Bonjours ,
J'ai chercher un plugin mais je n'ai rien trouver ^^ !
Si quelqu'un rentre dans le serveur après un X de temps ( 15sec par défaut ) , Il se slay !
Je sais qu'il y'a autre solution ( anti respawn etc ... ) , mais moi je veux que le joueur se slay ^^
Merci de m'aider a trouver/faire ce Plugin !
Electroo is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 07-26-2012 , 08:23   Re: Trop tard = Slay
#2

http://forums.alliedmods.net/showthread.php?p=555695

Oses nous dire que ce plugin ne peut pas slay le joueur en question :

PHP Code:
Forward_PlayerSpawn(id)
{
    if(
g_CurInfos[id][StoreRound] == g_iRoundNum)
    {
        
g_CurInfos[id][StoreRound] = 0
        set_task
(0.1"task_delay_kill"id+TASK_KILL)
    }
}

public 
task_delay_kill(id)
{
    
id -= TASK_KILL

    
new Float:fFrags
    pev
(idpev_fragsfFrags)
    
set_pev(idpev_frags, ++fFrags)

    
set_pdata_int(idOFFSET_CSDEATHSget_pdata_int(idOFFSET_CSDEATHS) - 1)

    new 
msgblock get_msg_block(g_msgidDeathMsg)
    
set_msg_block(g_msgidDeathMsgBLOCK_ONCE)
    
dllfunc(DLLFunc_ClientKillid)
    
set_msg_block(g_msgidDeathMsgmsgblock)

    
client_print(idprint_chat"** [Reconnect Features] %L"id"RF_SPAWN")

__________________
You can do anything you set your mind to, man.

Devil259 is offline
Electroo
Senior Member
Join Date: Jun 2012
Old 07-26-2012 , 16:04   Re: Trop tard = Slay
#3

Quote:
Forward_PlayerSpawn(id)
{
if(g_CurInfos[id][StoreRound] == g_iRoundNum)
{
g_CurInfos[id][StoreRound] = 0
set_task(0.1, "task_delay_kill", id+TASK_KILL)
}
}

public task_delay_kill(id)
{
id -= TASK_KILL

new Float:fFrags
pev(id, pev_frags, fFrags)
set_pev(id, pev_frags, ++fFrags)

set_pdata_int(id, OFFSET_CSDEATHS, get_pdata_int(id, OFFSET_CSDEATHS) - 1)

new msgblock = get_msg_block(g_msgidDeathMsg)
set_msg_block(g_msgidDeathMsg, BLOCK_ONCE)
dllfunc(DLLFunc_ClientKill, id)
set_msg_block(g_msgidDeathMsg, msgblock)

client_print(id, print_chat, "** [Reconnect Features] %L", id, "RF_SPAWN")
}
C'est le code du plugin demandé ? :O
Electroo is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 07-26-2012 , 16:54   Re: Trop tard = Slay
#4

Non, je t'ai passé le lien.
J'ai juste extrait un bout de code qui prouve que ça slay bien le joueur, car dans tes précédents posts (ou ceux de quelqu'un d'autre, j'ai pas vérifié), tu disais que ça ne slay pas.
__________________
You can do anything you set your mind to, man.

Devil259 is offline
Electroo
Senior Member
Join Date: Jun 2012
Old 07-26-2012 , 22:30   Re: Trop tard = Slay
#5

Quote:
J'ai juste extrait un bout de code qui prouve que ça slay bien le joueur
J'ai testé , ça ne slay pas !

EDIT :
ET j'ai remarquer un truc sur ce plugin !
Si un joueur utilise la commande retry il ne se spawn pas ( il était deja dans le serveur )
Mais quand un joueur vient de venir dans le serveur ( il n'était pas dans le serveur ) , il se spawn !

C'est pour ça je veux qu'il se slay , ou bien exécuter la cmd "Kill" sur lui !

Last edited by Electroo; 07-26-2012 at 22:35.
Electroo is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 07-27-2012 , 04:09   Re: Trop tard = Slay
#6

PHP Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>

#define VERSION "0.0.1"
#define PLUGIN "Late Spawners Slayer"

#define m_iDeaths 444

new g_pCvarSpawnTimeFloat:g_flSpawnTime

public plugin_init()
{
    
register_plugin(PLUGINVERSION"ConnorMcLeod")

    
g_pCvarSpawnTime register_cvar("amx_spawn_time""15.0")

    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")

    
RegisterHam(Ham_Spawn"player""CBasePlayer_Spawn_Post"true)
}

public 
Event_HLTV_New_Round()
{
    
g_flSpawnTime get_gametime() + get_pcvar_floatg_pCvarSpawnTime )
}

public 
CBasePlayer_Spawn_Postid )
{
    if( 
is_user_alive(id) && get_gametime() > g_flSpawnTime )
    {
        
user_kill(id1)
        
set_pdata_int(idm_iDeaths0)
        
ExecuteHam(Ham_AddPointsid0true)
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Electroo
Senior Member
Join Date: Jun 2012
Old 07-27-2012 , 08:13   Re: Trop tard = Slay
#7

Merci !
J'ai testé ça marche bien !
EDIT :
On peut ajouter un truc sur ce plugin ? :
Le plugin Revive.amxx , quand j'utilise amx_revive "Nick" , il se spawn et il se slay ^^
Possibilité de ne pas le slayé si j'utilise amx_revive ?

Last edited by Electroo; 07-27-2012 at 14:18.
Electroo is offline
 



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 12:56.


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