Bloquear Kill
#22
(04/07/2018, 11:03 PM)Nazy.- escribió: Les dire para que hice cada cosa...

Código PHP:
/* Script generated by Pawn Studio */

#include <amxmodx>
#include <amxmisc>

#define PLUGIN    "Kill Block"
#define AUTHOR    "Nazy.-"
#define VERSION    "1.0"

new cvar_kill

public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_clcmd("kill""client_kill")
    
    
cvar_kill register_cvar("amxx_kill""1"// Default: 1 // NO HACE FALTA EXPLICAR.
}
public 
client_kill(id// ACA COMIENZAN LAS FUNCIONES
{
    if(!
get_pcvar_num(cvar_kill)) // ACA SI ANDA DESACTIVADO EL CVAR NO SIRVE, ES FALSE
        
return user_kill(id1// ACA LE DA EL RETURN PARA QUE SE SUICIDE
    
    
if (get_pcvar_num(cvar_kill)) // ACA SI ANDA ACTIVADO EL CVAR SI SIRVE, ES TRUE
    
return PLUGIN_HANDLED // ACA LE DEVUELVE LA FUNCION, OSEA NO HACE NADA...
     
    
return PLUGIN_HANDLED// ACA SE ACABA EL PLUGIN, SIN ESO ME DA WARNING



Ya sé que es de hace unos dias, pero te corrijo...

el último return si lo pones solo porque "el plugin te da warning sino" es porque todavia no sabes como se manejan los return (y/o las funciones)

aca esto puede ayudarte: https://forums.alliedmods.net/showthread.php?t=99567
con eso te vas a dar cuenta que hiciste mal en ese code, o mejor dicho que hiciste de más...
Responder


Mensajes en este tema
Bloquear Kill - por Nazy.- - 04/07/2018, 06:17 PM
RE: Bloquear Kill - por matrix123 - 04/07/2018, 06:24 PM
RE: Bloquear Kill - por Nazy.- - 04/07/2018, 06:40 PM
RE: Bloquear Kill - por Pan Bimbo (? - 06/07/2018, 12:27 PM
RE: Bloquear Kill - por Pan Bimbo (? - 04/07/2018, 06:34 PM
RE: Bloquear Kill - por El pirucho XP-007 - 04/07/2018, 06:46 PM
RE: Bloquear Kill - por matrix123 - 04/07/2018, 06:51 PM
RE: Bloquear Kill - por Chamo. - 04/07/2018, 10:54 PM
RE: Bloquear Kill - por El pirucho XP-007 - 04/07/2018, 06:54 PM
RE: Bloquear Kill - por matrix123 - 04/07/2018, 06:56 PM
RE: Bloquear Kill - por El pirucho XP-007 - 04/07/2018, 07:00 PM
RE: Bloquear Kill - por matrix123 - 04/07/2018, 07:02 PM
RE: Bloquear Kill - por Nazy.- - 04/07/2018, 11:03 PM
RE: Bloquear Kill - por matrix123 - 11/07/2018, 01:58 PM
RE: Bloquear Kill - por Valentina. - 04/07/2018, 11:25 PM
RE: Bloquear Kill - por Nazy.- - 05/07/2018, 04:33 PM
RE: Bloquear Kill - por Skylar - 05/07/2018, 07:05 PM
RE: Bloquear Kill - por Niper.-. - 05/07/2018, 09:14 PM
RE: Bloquear Kill - por SthoNy' - 06/07/2018, 05:36 AM
RE: Bloquear Kill - por KrR10VnZl - 05/07/2018, 09:47 PM
RE: Bloquear Kill - por Nazy.- - 06/07/2018, 10:50 AM
RE: Bloquear Kill - por Saber - 06/07/2018, 11:27 AM

Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)