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

Respawn de laser


  
 
 
Thread Tools Display Modes
Author Message
pepito
Member
Join Date: Sep 2011
Old 09-26-2011 , 21:33   Respawn de laser
#1

Bueno, anteriormente habia pedido si se le podia dar 1 o 2 segundos de godmod a todos los juegadores apensas comenzara la ronda para que los players no muerdan con el respawn de laser y gladius me dejo esto:
PHP Code:
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>

new g_MaxPlayers
new g_Godmode[33]
const 
Float:g_GodmodeDelay 2.0

public plugin_init() 
{
    
register_plugin("GodMode""1.0""Autor")
    
        
    
register_event("HLTV""Event_New_Round""a""1=0""2=0")
    
RegisterHam(Ham_Spawn"player""Ham_Fwd_PlayerSpawn_Post"1)
    
    
g_MaxPlayers get_maxplayers()
}

public 
client_putinserver(id)
{
    
g_Godmode[id] = true
}

public 
Event_New_Round()
{
    for(new 
ig_MaxPlayersi++)
    {
        
g_Godmode[i] = true
    
}
}

public 
Ham_Fwd_PlayerSpawn_Post(id)
{    
    if(
is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT && g_Godmode[id])
    {
        
g_Godmode[id] = false
        set_user_godmode
(id1)
        
set_task(g_GodmodeDelay"Remove_Godmode"id)
    }
}

public 
Remove_Godmode(id)
{
    
set_user_godmode(id)



yo queria que sirviera para todos los players, asi como esta sirve solo para los ct.. si alguien me dice como poner para que sea para ct y tt muy agradecido.

Last edited by Starsailor; 09-26-2011 at 21:38.
pepito is offline
Send a message via MSN to pepito Send a message via Skype™ to pepito
Starsailor
horrible hahah
Join Date: Aug 2008
Location: Buenos Aires
Old 09-26-2011 , 21:36   Re: RESPAWN DE LASER!
#2

https://forums.alliedmods.net/showthread.php?t=149597
El título y el mensaje:
  • No colocar formato al texto como: negrita, subrayado, cursiva, MAYUSCULA, colores y demás cosas, ya que se usan para resaltar ciertas palabras o frases importantes.
  • Al poner un código, deben usar los bbcodes y no ponerlo suelto. Los más recomendados son: [php], [pawn] y [small].
    • Al ser un código muy largo, deberia ir [php] ya que usa las barras para poder recorrer el code, a diferencia de los otros.

Ultima advertencia, ahora modifico yo, la proxima 10 dias de ban.
__________________
Find my plugins here..

Ex - Spanish Moderator.

Last edited by Starsailor; 09-26-2011 at 21:38.
Starsailor is offline
stgmatar
Member
Join Date: Jul 2011
Old 09-26-2011 , 21:38   Re: RESPAWN DE LASER!
#3

Cambia

Code:
if(is_user_alive(id) && cs_get_user_team(id) == CS_TEAM_CT && g_Godmode[id])


Code:
if(is_user_alive(id) && g_Godmode[id])
Supongo que ha de ser asi..

Tambien quita el include del cstrike...
__________________


I'm in Dota 2 Beta

Last edited by stgmatar; 09-26-2011 at 21:41.
stgmatar 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 21:05.


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