actualizar plugins viejo
#1
hola estado intentando hacer funciona este plugins pero para mi es imposible es muy antiguo

si hay alguien que puede darme una mano porfa se lo agradeceria mucho


Código PHP:
/*************************************************************************************************************

  Plugin: AMX Ejaculate
  Version: 0.2
  Author: KRoT@L

  0.1  Release
  0.2  Improved the code
       Renamed cvar amx_maxejaculations into "amx_ejaculate_max"
       Renamed cvar amx_ejaculate_admin into "amx_ejaculate_admins"
       Added cvars amx_ejaculate_active and amx_ejaculate_range
       Removed #define NO_CS_CZ (you can now ejaculate anywhere if "amx_ejaculate_range" is lower than 30)
       Added #define PRINT_TYPE to be able to change the type of information message (print_console or print_chat)


  Commands:

    ejaculate - ejaculates on a dead body or anywhere
    say /ejaculate_help - displays ejaculate help

    To ejaculate on a dead body or anywhere you have to bind a key to "ejaculate".
    Open your console and type: bind "key" "ejaculate"
    Example: bind "x" "ejaculate"
    Then stand still above a dead player, press your key and you'll ejaculate on him!
    You can control the direction of the semen with your mouse!

    Players can write "/ejaculate_help" in the chat to get some help.


  Cvars:

    amx_ejaculate_active <0|1> - disable/enable the plugin (default: 1)

    amx_ejaculate_admins <0|1> - disable/enable the usage of the plugin only for admins (default: 0)

    amx_ejaculate_max "3" - maximum number of times a player is allowed to ejaculate per each spawning

    amx_ejaculate_range "80" - maximum range between a dead body and a player who wants ejaculate (must be between 30 and 300)
    Note: Set to a value lower than 30 (MIN_RANGE) to be able to ejaculate anywhere you want.


  Requirement:

    AMX Mod 2010.1 or higher.


*************************************************************************************************************/

/******************************************************************************/
// If you change one of the following settings, do not forget to recompile
// the plugin and to install the new .amx file on your server.
// You can find the list of admin flags in the amx/examples/include/amxconst.inc file.

#define FLAG_EJACULATE      ADMIN_ALL
#define FLAG_EJACULATE_HELP ADMIN_ALL

// Mode of print for ejaculate info messages from the "ejaculate" command.
// Values are either "print_console", "print_chat" or "print_center".
#define PRINT_TYPE print_chat

// Edit here the minimal & maximal range value in units.
// Notes: This is used to check the distance between a player who wants ejaculate on a dead body.
// If the cvar "amx_ejaculate_range" is lower than MIN_RANGE, players can ejaculate anywhere.
#define MIN_RANGE 30
#define MAX_RANGE 300

/******************************************************************************/

#include <translator>
#include <amxmod>
#include <amxmisc>

new g_iPlayerCounter[33]
new 
g_iPlayerEjaculationsNum[33]
new 
g_iPlayerOrigins[33][3]

new 
g_cvarAmxEjaculateActive
new g_cvarAmxEjaculateAdmins
new g_cvarAmxEjaculateMax
new g_cvarAmxEjaculateRange

#define MAX_COUNTER 10
#define TASKID_make_ejaculate 37931975

public plugin_precache() {
  
load_translations("amx_ejaculate")

  new const 
szSoundFile[] = "sound/ejaculate/ejaculate.wav"
  
if(file_exists(szSoundFile)) {
    
precache_sound(szSoundFile[6])
  }
  else {
    
log_amx(_T("AMX Ejaculate: WARNING! Sound file ^"%s^" doesn't exist on the server."), szSoundFile)
  }
}

public 
plugin_init() {
  
register_plugin(_T("AMX Ejaculate"),"0.2","KRoT@L")
  
register_clcmd("ejaculate""ejaculate_on_player"FLAG_EJACULATE_T("- ejaculates on a dead body or anywhere"))
  
register_clcmd("say /ejaculate_help""ejaculate_help"FLAG_EJACULATE_HELP_T("- displays ejaculate help"))
  
g_cvarAmxEjaculateActive register_cvar("amx_ejaculate_active""1")
  
g_cvarAmxEjaculateAdmins register_cvar("amx_ejaculate_admins""0")
  
g_cvarAmxEjaculateMax register_cvar("amx_ejaculate_max""3")
  
g_cvarAmxEjaculateRange register_cvar("amx_ejaculate_range""80")
  
register_event("ResetHUD""reset_hud""be")
  
register_event("DeathMsg""death_event""a")
}

public 
client_putinserver(id) {
  
g_iPlayerCounter[id] = 0
  g_iPlayerEjaculationsNum
[id] = 0
}

public 
client_disconnect(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }
}

public 
ejaculate_on_player(idiLevel) {
  if(!
access(idiLevel)) {
    
console_print(id_T("You have no access to that command."))
    return 
PLUGIN_HANDLED
  
}

  if(
g_iPlayerCounter[id]) {
    
client_print(idPRINT_TYPE_T("You are already in ejaculating."))
    return 
PLUGIN_HANDLED
  
}

  if(
get_cvarptr_num(g_cvarAmxEjaculateActive) <= 0) {
    
client_print(idPRINT_TYPE_T("The plugin ^"AMX Ejaculate^" is disabled."))
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateRange
  
if(get_cvarptr_num(g_cvarAmxEjaculateAdmins) > && !is_user_realadmin(id)) {
    if((
iEjaculateRange get_cvarptr_num(g_cvarAmxEjaculateRange)) >= MIN_RANGE) {
      
client_print(idPRINT_TYPE_T("Only admins can ejaculate on a dead body."))
    }
    else {
      
client_print(idPRINT_TYPE_T("Only admins can ejaculate."))
    }
    return 
PLUGIN_HANDLED
  
}

  if(!
is_user_alive(id)) {
    
client_print(idPRINT_TYPE_T("You can't ejaculate when you are dead."))
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateMax get_cvarptr_num(g_cvarAmxEjaculateMax)
  if(
g_iPlayerEjaculationsNum[id] >= iEjaculateMax) {
    
client_print(idPRINT_TYPE_T("You can't ejaculate more than %d time(s) per each spawning."), iEjaculateMax)
    return 
PLUGIN_HANDLED
  
}

  
iEjaculateRange get_cvarptr_num(g_cvarAmxEjaculateRange)
  if(
iEjaculateRange >= MIN_RANGE) {
    new 
iOrigin[3], iPlayers[32], iPlayersNumiPlayer
    
new iCurrentDistanceiDeadBodyiMinDistance clamp(iEjaculateRangeMIN_RANGEMAX_RANGE)

    if(
iEjaculateRange MAX_RANGE) {
      
set_cvar_num("amx_ejaculate_range"MAX_RANGE)
    }

    
get_user_origin(idiOrigin)
    
get_players(iPlayersiPlayersNum"bh")

    for(--
iPlayersNumiPlayersNum >= 0iPlayersNum--) {
      
iPlayer iPlayers[iPlayersNum]
      
iCurrentDistance get_distance(iOriging_iPlayerOrigins[iPlayer])
      if(
iCurrentDistance iMinDistance) {
        
iMinDistance iCurrentDistance
        iDeadBody 
iPlayer
      
}
    }

    if(
iDeadBody 0) {
      new 
szPlayerName[32]
      
get_user_name(iDeadBodyszPlayerNamecharsmax(szPlayerName))

      if((
get_user_flags(iDeadBody) & ADMIN_IMMUNITY) && (get_user_flags(id) & ADMIN_SUPREME) == 0) {
        
client_print(idPRINT_TYPE_T("Player ^"%s^" has immunity."), szPlayerName)
        return 
PLUGIN_HANDLED
      
}

      new 
szName[32]
      
get_user_name(idszNamecharsmax(szName))
      
client_print(0print_chat_T("%s Is Ejaculating On %s's Dead Body!! MuHaHaHaHa!!"), szNameszPlayerName)
    }
    else {
      
client_print(idPRINT_TYPE_T("There is no dead body around you."))
      return 
PLUGIN_HANDLED
    
}
  }
  else {
    new 
szName[32]
    
get_user_name(idszNamecharsmax(szName))
    
client_print(0print_chat_T("%s Is Ejaculating!"), szName)
  }

  
g_iPlayerCounter[id] = 1
  g_iPlayerEjaculationsNum
[id]++

  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"1.0ATTN_NORM0PITCH_NORM)
  
set_task(1.0"make_ejaculate"id TASKID_make_ejaculate__"a"MAX_COUNTER 1)

  return 
PLUGIN_HANDLED
}

public 
ejaculate_help(idiLevel) {
  new 
szArgs[24]
  new 
iArgsLen read_args(szArgscharsmax(szArgs))
  new 
iPrintType = (szArgs[0] == '"' && szArgs[iArgsLen 1] == '"') ? print_chat print_console

  
if(!access(idiLevel)) {
    
client_print(idiPrintType_T("You have no access to that command."))
    return 
PLUGIN_HANDLED
  
}

  
client_print(idiPrintType_T("To ejaculate on a dead body or anywhere you have to bind a key to ^"ejaculate^"."))
  
client_print(idiPrintType_T("Open your console and write: bind ^"key^" ^"ejaculate^""))
  
client_print(idiPrintType_T("Example: bind ^"x^" ^"ejaculate^""))

  return 
PLUGIN_HANDLED
}

public 
make_ejaculate(id) {
  
id -= TASKID_make_ejaculate

  
new iOrigin[3], iVelocity[3], Float:fVelocity[3]
  
get_user_origin(idiOrigin)
  
VelocityByAim(id3fVelocity)
  
FVecIVec(fVelocityiVelocity)

  
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
  
write_byte(TE_BLOODSTREAM)
  
write_coord(iOrigin[0])
  
write_coord(iOrigin[1])
  
write_coord(iOrigin[2])
  
write_coord(iVelocity[0])
  
write_coord(iVelocity[1])
  
write_coord(iVelocity[2])
  
write_byte(6// color
  
write_byte(165// speed
  
message_end()

  if(++
g_iPlayerCounter[id] == MAX_COUNTER 1) {
    
g_iPlayerCounter[id] = 0
  
}
}

public 
reset_hud(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }

  
g_iPlayerEjaculationsNum[id] = 0
}

public 
death_event() {
  new 
victim read_data(2)
  
get_user_origin(victimg_iPlayerOrigins[victim], 0)

  if(
g_iPlayerCounter[victim]) {
    
reset_ejaculate(victim)
  }
}

reset_ejaculate(id) {
  
g_iPlayerCounter[id] = 0
  remove_task
(id TASKID_make_ejaculate)
  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"0.0ATTN_NORM0PITCH_NORM)





Welcome to the AMX Mod X 1.8.1-300 Compiler.
Copyright © 1997-2013 ITB CompuPhase, AMX Mod X Team

Error: Undefined symbol "get_cvarptr_num" on line 131
Error: Undefined symbol "get_cvarptr_num" on line 137
Error: Undefined symbol "get_cvarptr_num" on line 138
Error: Undefined symbol "get_cvarptr_num" on line 152
Error: Undefined symbol "get_cvarptr_num" on line 158
Warning: Symbol is assigned a value that is never used: "g_cvarAmxEjaculateActive" on line 276
Warning: Symbol is assigned a value that is never used: "g_cvarAmxEjaculateAdmins" on line 276
Warning: Symbol is assigned a value that is never used: "g_cvarAmxEjaculateMax" on line 276
Warning: Symbol is assigned a value that is never used: "g_cvarAmxEjaculateRange" on line 276

5 Errors.
Could not locate output file C:\Users\yoo\Desktop\amx_ejaculate.amx (compile failed).
Responder
#2
No es que el plugin sea muy antiguo, es que tu no supiste "editar" el plugin.
Fijate en tus errores y arreglalos y luego compila.
Tengo un problema con los emotes  Whatdone 

Ayuda  Whatdone 
Responder
#3
lo pudiste compilar tu ?

no se donde encontrar el #include <translator>

uso la amx 1.9
Responder
#4
(17/10/2020, 07:45 PM)Ninja uwu escribió: No es que el plugin sea muy antiguo, es que tu no supiste "editar" el plugin.
Fijate en tus errores y arreglalos y luego compila.

Si es un plugin muy antiguo, según lo que leí, el translator se dejó de usar hace muchos años.

Pero aquí encontré el include... http://svn.ian.cammarata.us/index.cgi/Ha...iew=markup
Responder
#5
gracias pero me sale ese error aun
Responder
#6
Leyendo un poco más, ese plugin es obsoleto.
Es un plugin AMX, no AMXX.
Responder
#7
Código PHP:
/*************************************************************************************************************

  Plugin: AMX Ejaculate
  Version: 0.2
  Author: KRoT@L

  0.1  Release
  0.2  Improved the code
       Renamed cvar amx_maxejaculations into "amx_ejaculate_max"
       Renamed cvar amx_ejaculate_admin into "amx_ejaculate_admins"
       Added cvars amx_ejaculate_active and amx_ejaculate_range
       Removed #define NO_CS_CZ (you can now ejaculate anywhere if "amx_ejaculate_range" is lower than 30)
       Added #define PRINT_TYPE to be able to change the type of information message (print_console or print_chat)


  Commands:

    ejaculate - ejaculates on a dead body or anywhere
    say /ejaculate_help - displays ejaculate help

    To ejaculate on a dead body or anywhere you have to bind a key to "ejaculate".
    Open your console and type: bind "key" "ejaculate"
    Example: bind "x" "ejaculate"
    Then stand still above a dead player, press your key and you'll ejaculate on him!
    You can control the direction of the semen with your mouse!

    Players can write "/ejaculate_help" in the chat to get some help.


  Cvars:

    amx_ejaculate_active <0|1> - disable/enable the plugin (default: 1)

    amx_ejaculate_admins <0|1> - disable/enable the usage of the plugin only for admins (default: 0)

    amx_ejaculate_max "3" - maximum number of times a player is allowed to ejaculate per each spawning

    amx_ejaculate_range "80" - maximum range between a dead body and a player who wants ejaculate (must be between 30 and 300)
    Note: Set to a value lower than 30 (MIN_RANGE) to be able to ejaculate anywhere you want.


  Requirement:

    AMX Mod 2010.1 or higher.


*************************************************************************************************************/

/******************************************************************************/
// If you change one of the following settings, do not forget to recompile
// the plugin and to install the new .amx file on your server.
// You can find the list of admin flags in the amx/examples/include/amxconst.inc file.

#define FLAG_EJACULATE      ADMIN_ALL
#define FLAG_EJACULATE_HELP ADMIN_ALL

// Mode of print for ejaculate info messages from the "ejaculate" command.
// Values are either "print_console", "print_chat" or "print_center".
#define PRINT_TYPE print_chat

// Edit here the minimal & maximal range value in units.
// Notes: This is used to check the distance between a player who wants ejaculate on a dead body.
// If the cvar "amx_ejaculate_range" is lower than MIN_RANGE, players can ejaculate anywhere.
#define MIN_RANGE 30
#define MAX_RANGE 300

/******************************************************************************/

#include <amxmodx>
#include <amxmisc>

new g_iPlayerCounter[33]
new 
g_iPlayerEjaculationsNum[33]
new 
g_iPlayerOrigins[33][3]

new 
g_cvarAmxEjaculateActive
new g_cvarAmxEjaculateAdmins
new g_cvarAmxEjaculateMax
new g_cvarAmxEjaculateRange

#define MAX_COUNTER 10
#define TASKID_make_ejaculate 37931975

public plugin_precache() 
{
    new const 
szSoundFile[] = "sound/ejaculate/ejaculate.wav"
    
    
if(file_exists(szSoundFile))
    {
        
precache_sound(szSoundFile[6])
    }
    else
    {
        
log_amx("AMX Ejaculate: WARNING! Sound file ^"%s^" doesn't exist on the server."szSoundFile)
    }
}

public 
plugin_init() 
{
    
register_plugin("AMX Ejaculate","0.2","KRoT@L")
    
register_clcmd("ejaculate""ejaculate_on_player"FLAG_EJACULATE"- ejaculates on a dead body or anywhere")
    
register_clcmd("say /ejaculate_help""ejaculate_help"FLAG_EJACULATE_HELP"- displays ejaculate help")
    
g_cvarAmxEjaculateActive register_cvar("amx_ejaculate_active""1")
    
g_cvarAmxEjaculateAdmins register_cvar("amx_ejaculate_admins""0")
    
g_cvarAmxEjaculateMax register_cvar("amx_ejaculate_max""3")
    
g_cvarAmxEjaculateRange register_cvar("amx_ejaculate_range""80")
    
register_event("ResetHUD""reset_hud""be")
    
register_event("DeathMsg""death_event""a")
}

public 
client_putinserver(id) {
  
g_iPlayerCounter[id] = 0
  g_iPlayerEjaculationsNum
[id] = 0
}

public 
client_disconnected(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }
}

public 
ejaculate_on_player(idiLevel
{
    if(!
access(idiLevel)) 
    {
        
console_print(id"You have no access to that command.")
        return 
PLUGIN_HANDLED
    
}

    if(
g_iPlayerCounter[id]) 
    {
        
client_print(idPRINT_TYPE"You are already in ejaculating.")
        return 
PLUGIN_HANDLED
    
}

    if(
get_pcvar_num(g_cvarAmxEjaculateActive) <= 0)
    {
        
client_print(idPRINT_TYPE"The plugin ^"AMX Ejaculate^" is disabled.")
        return 
PLUGIN_HANDLED
    
}

    new 
iEjaculateRange
    
if(get_pcvar_num(g_cvarAmxEjaculateAdmins) > && !(get_user_flags(id) & FLAG_EJACULATE)) 
    {
        if((
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)) >= MIN_RANGE
        {
            
client_print(idPRINT_TYPE"Only admins can ejaculate on a dead body.")
        }
        else 
        {
            
client_print(idPRINT_TYPE"Only admins can ejaculate.")
        }
        return 
PLUGIN_HANDLED
    
}

    if(!
is_user_alive(id))
    {
        
client_print(idPRINT_TYPE"You can't ejaculate when you are dead.")
        return 
PLUGIN_HANDLED
    
}

    new 
iEjaculateMax get_pcvar_num(g_cvarAmxEjaculateMax)
    if(
g_iPlayerEjaculationsNum[id] >= iEjaculateMax
    {
        
client_print(idPRINT_TYPE"You can't ejaculate more than %d time(s) per each spawning."iEjaculateMax)
        return 
PLUGIN_HANDLED
    
}

    
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)
    if(
iEjaculateRange >= MIN_RANGE
    {
        new 
iOrigin[3], iPlayers[32], iPlayersNumiPlayer
        
new iCurrentDistanceiDeadBodyiMinDistance clamp(iEjaculateRangeMIN_RANGEMAX_RANGE)

        if(
iEjaculateRange MAX_RANGE) {
            
set_cvar_num("amx_ejaculate_range"MAX_RANGE)
    }

    
get_user_origin(idiOrigin)
    
get_players(iPlayersiPlayersNum"bh")

    for(--
iPlayersNumiPlayersNum >= 0iPlayersNum--) 
    {
        
iPlayer iPlayers[iPlayersNum]
        
iCurrentDistance get_distance(iOriging_iPlayerOrigins[iPlayer])
        
        if(
iCurrentDistance iMinDistance
        {
            
iMinDistance iCurrentDistance
            iDeadBody 
iPlayer
        
}
    }

    if(
iDeadBody 0
    {
        new 
szPlayerName[32]
        
get_user_name(iDeadBodyszPlayerNamecharsmax(szPlayerName))

        if((
get_user_flags(iDeadBody) & ADMIN_IMMUNITY) && (get_user_flags(id) & ADMIN_ADMIN))
        {
            
client_print(idPRINT_TYPE"Player ^"%s^" has immunity."szPlayerName)
            return 
PLUGIN_HANDLED
        
}

        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))
        
client_print(0print_chat"%s Is Ejaculating On %s's Dead Body!! MuHaHaHaHa!!"szNameszPlayerName)
    
        }    
        else 
        {
            
client_print(idPRINT_TYPE"There is no dead body around you.")
            return 
PLUGIN_HANDLED
        
}
    }
    else
    {
        new 
szName[32]
        
get_user_name(idszNamecharsmax(szName))
        
client_print(0print_chat"%s Is Ejaculating!"szName)
    }

    
g_iPlayerCounter[id] = 1
    g_iPlayerEjaculationsNum
[id]++

    
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"1.0ATTN_NORM0PITCH_NORM)
    
set_task(1.0"make_ejaculate"id TASKID_make_ejaculate__"a"MAX_COUNTER 1)

    return 
PLUGIN_HANDLED
}

public 
ejaculate_help(idiLevel)
{
    new 
szArgs[24]
    new 
iArgsLen read_args(szArgscharsmax(szArgs))
    new 
iPrintType = (szArgs[0] == '"' && szArgs[iArgsLen 1] == '"') ? print_chat print_console

    
if(!access(idiLevel)) 
    {
        
client_print(idiPrintType"You have no access to that command.")
        return 
PLUGIN_HANDLED
    
}

    
client_print(idiPrintType"To ejaculate on a dead body or anywhere you have to bind a key to ^"ejaculate^".")
    
client_print(idiPrintType"Open your console and write: bind ^"key^" ^"ejaculate^"")
    
client_print(idiPrintType"Example: bind ^"x^" ^"ejaculate^"")

    return 
PLUGIN_HANDLED
}

public 
make_ejaculate(id
{
    
id -= TASKID_make_ejaculate

    
new iOrigin[3], iVelocity[3], Float:fVelocity[3]
    
get_user_origin(idiOrigin)
    
velocity_by_aim(id3fVelocity)
    
FVecIVec(fVelocityiVelocity)

    
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
    
write_byte(TE_BLOODSTREAM)
    
write_coord(iOrigin[0])
    
write_coord(iOrigin[1])
    
write_coord(iOrigin[2])
    
write_coord(iVelocity[0])
    
write_coord(iVelocity[1])
    
write_coord(iVelocity[2])
    
write_byte(6// color
    
write_byte(165// speed
    
message_end()

    if(++
g_iPlayerCounter[id] == MAX_COUNTER 1)
    {
    
g_iPlayerCounter[id] = 0
    
}
}

public 
reset_hud(id)
{
    if(
g_iPlayerCounter[id])
    {
        
reset_ejaculate(id)
    }

    
g_iPlayerEjaculationsNum[id] = 0
}

public 
death_event()
{
    new 
victim read_data(2)
    
get_user_origin(victimg_iPlayerOrigins[victim], 0)

    if(
g_iPlayerCounter[victim])
    {
        
reset_ejaculate(victim)
    }
}

reset_ejaculate(id
{
    
g_iPlayerCounter[id] = 0
    remove_task
(id TASKID_make_ejaculate)
    
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"0.0ATTN_NORM0PITCH_NORM)

Responder
#8
(17/10/2020, 07:45 PM)Ninja uwu escribió: No es que el plugin sea muy antiguo, es que tu no supiste "editar" el plugin.
Fijate en tus errores y arreglalos y luego compila.

Qué absurda respuesta. Lee aunque sea, es un plugin programado usando librerías del amxmod, sin X Sonrisa se deben reescribir algunas funciones. Aquí no se obliga a ayudar, pasa de largo la próxima, los tóxicos duran poco.
Responder
#9
Prueba

Código PHP:
/*************************************************************************************************************

  Plugin: AMX Ejaculate
  Version: 0.2
  Author: KRoT@L

  0.1  Release
  0.2  Improved the code
       Renamed cvar amx_maxejaculations into "amx_ejaculate_max"
       Renamed cvar amx_ejaculate_admin into "amx_ejaculate_admins"
       Added cvars amx_ejaculate_active and amx_ejaculate_range
       Removed #define NO_CS_CZ (you can now ejaculate anywhere if "amx_ejaculate_range" is lower than 30)
       Added #define PRINT_TYPE to be able to change the type of information message (print_console or print_chat)


  Commands:

    ejaculate - ejaculates on a dead body or anywhere
    say /ejaculate_help - displays ejaculate help

    To ejaculate on a dead body or anywhere you have to bind a key to "ejaculate".
    Open your console and type: bind "key" "ejaculate"
    Example: bind "x" "ejaculate"
    Then stand still above a dead player, press your key and you'll ejaculate on him!
    You can control the direction of the semen with your mouse!

    Players can write "/ejaculate_help" in the chat to get some help.


  Cvars:

    amx_ejaculate_active <0|1> - disable/enable the plugin (default: 1)

    amx_ejaculate_admins <0|1> - disable/enable the usage of the plugin only for admins (default: 0)

    amx_ejaculate_max "3" - maximum number of times a player is allowed to ejaculate per each spawning

    amx_ejaculate_range "80" - maximum range between a dead body and a player who wants ejaculate (must be between 30 and 300)
    Note: Set to a value lower than 30 (MIN_RANGE) to be able to ejaculate anywhere you want.


  Requirement:

    AMX Mod 2010.1 or higher.


*************************************************************************************************************/

/******************************************************************************/
// If you change one of the following settings, do not forget to recompile
// the plugin and to install the new .amx file on your server.
// You can find the list of admin flags in the amx/examples/include/amxconst.inc file.

#define FLAG_EJACULATE      ADMIN_ALL
#define FLAG_EJACULATE_HELP ADMIN_ALL

// Mode of print for ejaculate info messages from the "ejaculate" command.
// Values are either "print_console", "print_chat" or "print_center".
#define PRINT_TYPE print_chat

// Edit here the minimal & maximal range value in units.
// Notes: This is used to check the distance between a player who wants ejaculate on a dead body.
// If the cvar "amx_ejaculate_range" is lower than MIN_RANGE, players can ejaculate anywhere.
#define MIN_RANGE 30
#define MAX_RANGE 300

/******************************************************************************/

#include <amxmodx>
#include <amxmisc>

new g_iPlayerCounter[33]
new 
g_iPlayerEjaculationsNum[33]
new 
g_iPlayerOrigins[33][3]

new 
g_cvarAmxEjaculateActive
new g_cvarAmxEjaculateAdmins
new g_cvarAmxEjaculateMax
new g_cvarAmxEjaculateRange

#define MAX_COUNTER 10
#define TASKID_make_ejaculate 37931975

public plugin_precache() {
  new const 
szSoundFile[] = "sound/ejaculate/ejaculate.wav"
  
if(file_exists(szSoundFile)) {
    
precache_sound(szSoundFile[6])
  }
  else {
    
log_amx("AMX Ejaculate: WARNING! Sound file ^"%s^" doesn't exist on the server."szSoundFile)
  }
}

public 
plugin_init() {
  
register_plugin("AMX Ejaculate","0.2","KRoT@L")
  
register_clcmd("ejaculate""ejaculate_on_player"FLAG_EJACULATE"- ejaculates on a dead body or anywhere")
  
register_clcmd("say /ejaculate_help""ejaculate_help"FLAG_EJACULATE_HELP"- displays ejaculate help")
  
g_cvarAmxEjaculateActive register_cvar("amx_ejaculate_active""1")
  
g_cvarAmxEjaculateAdmins register_cvar("amx_ejaculate_admins""0")
  
g_cvarAmxEjaculateMax register_cvar("amx_ejaculate_max""3")
  
g_cvarAmxEjaculateRange register_cvar("amx_ejaculate_range""80")
  
register_event("ResetHUD""reset_hud""be")
  
register_event("DeathMsg""death_event""a")
}

public 
client_putinserver(id) {
  
g_iPlayerCounter[id] = 0
  g_iPlayerEjaculationsNum
[id] = 0
}

public 
client_disconnected(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }
}

public 
ejaculate_on_player(idiLevel) {
  if(!
access(idiLevel)) {
    
console_print(id"You have no access to that command.")
    return 
PLUGIN_HANDLED
  
}

  if(
g_iPlayerCounter[id]) {
    
client_print(idPRINT_TYPE"You are already in ejaculating.")
    return 
PLUGIN_HANDLED
  
}

  if(
get_pcvar_num(g_cvarAmxEjaculateActive) <= 0) {
    
client_print(idPRINT_TYPE"The plugin ^"AMX Ejaculate^" is disabled.")
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateRange
  
if(get_pcvar_num(g_cvarAmxEjaculateAdmins) > && !is_user_admin(id)) {
    if((
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)) >= MIN_RANGE) {
      
client_print(idPRINT_TYPE"Only admins can ejaculate on a dead body.")
    }
    else {
      
client_print(idPRINT_TYPE"Only admins can ejaculate.")
    }
    return 
PLUGIN_HANDLED
  
}

  if(!
is_user_alive(id)) {
    
client_print(idPRINT_TYPE"You can't ejaculate when you are dead.")
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateMax get_pcvar_num(g_cvarAmxEjaculateMax)
  if(
g_iPlayerEjaculationsNum[id] >= iEjaculateMax) {
    
client_print(idPRINT_TYPE"You can't ejaculate more than %d time(s) per each spawning."iEjaculateMax)
    return 
PLUGIN_HANDLED
  
}

  
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)
  if(
iEjaculateRange >= MIN_RANGE) {
    new 
iOrigin[3], iPlayers[32], iPlayersNumiPlayer
    
new iCurrentDistanceiDeadBodyiMinDistance clamp(iEjaculateRangeMIN_RANGEMAX_RANGE)

    if(
iEjaculateRange MAX_RANGE) {
      
set_cvar_num("amx_ejaculate_range"MAX_RANGE)
    }
    
get_user_origin(idiOrigin)
    
get_players(iPlayersiPlayersNum"bh")

    for(--
iPlayersNumiPlayersNum >= 0iPlayersNum--) {
      
iPlayer iPlayers[iPlayersNum]
      
iCurrentDistance get_distance(iOriging_iPlayerOrigins[iPlayer])
      if(
iCurrentDistance iMinDistance) {
        
iMinDistance iCurrentDistance
        iDeadBody 
iPlayer
      
}
    }

    if(
iDeadBody 0) {
      new 
szPlayerName[32]
      
get_user_name(iDeadBodyszPlayerNamecharsmax(szPlayerName))

      if((
get_user_flags(iDeadBody) & ADMIN_IMMUNITY) && (get_user_flags(id) & ADMIN_IMMUNITY) == 0) {
        
client_print(idPRINT_TYPE"Player ^"%s^" has immunity."szPlayerName)
        return 
PLUGIN_HANDLED
      
}

      new 
szName[32]
      
get_user_name(idszNamecharsmax(szName))
      
client_print(0print_chat"%s Is Ejaculating On %s's Dead Body!! MuHaHaHaHa!!"szNameszPlayerName)
    }
    else {
      
client_print(idPRINT_TYPE"There is no dead body around you.")
      return 
PLUGIN_HANDLED
    
}
  }
  else {
    new 
szName[32]
    
get_user_name(idszNamecharsmax(szName))
    
client_print(0print_chat"%s Is Ejaculating!"szName)
  }

  
g_iPlayerCounter[id] = 1
  g_iPlayerEjaculationsNum
[id]++

  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"1.0ATTN_NORM0PITCH_NORM)
  
set_task(1.0"make_ejaculate"id TASKID_make_ejaculate__"a"MAX_COUNTER 1)

  return 
PLUGIN_HANDLED
}

public 
ejaculate_help(idiLevel) {
  new 
szArgs[24]
  new 
iArgsLen read_args(szArgscharsmax(szArgs))
  new 
iPrintType = (szArgs[0] == '"' && szArgs[iArgsLen 1] == '"') ? print_chat print_console

  
if(!access(idiLevel)) {
    
client_print(idiPrintType"You have no access to that command.")
    return 
PLUGIN_HANDLED
  
}

  
client_print(idiPrintType"To ejaculate on a dead body or anywhere you have to bind a key to ^"ejaculate^".")
  
client_print(idiPrintType"Open your console and write: bind ^"key^" ^"ejaculate^"")
  
client_print(idiPrintType"Example: bind ^"x^" ^"ejaculate^"")

  return 
PLUGIN_HANDLED
}

public 
make_ejaculate(id) {
  
id -= TASKID_make_ejaculate

  
new iOrigin[3], iVelocity[3], Float:fVelocity[3]
  
get_user_origin(idiOrigin)
  
velocity_by_aim(id3fVelocity)
  
FVecIVec(fVelocityiVelocity)

  
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
  
write_byte(TE_BLOODSTREAM)
  
write_coord(iOrigin[0])
  
write_coord(iOrigin[1])
  
write_coord(iOrigin[2])
  
write_coord(iVelocity[0])
  
write_coord(iVelocity[1])
  
write_coord(iVelocity[2])
  
write_byte(6// color
  
write_byte(165// speed
  
message_end()

  if(++
g_iPlayerCounter[id] == MAX_COUNTER 1) {
    
g_iPlayerCounter[id] = 0
  
}
}

public 
reset_hud(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }

  
g_iPlayerEjaculationsNum[id] = 0
}

public 
death_event() {
  new 
victim read_data(2)
  
get_user_origin(victimg_iPlayerOrigins[victim], 0)

  if(
g_iPlayerCounter[victim]) {
    
reset_ejaculate(victim)
  }
}

reset_ejaculate(id) {
  
g_iPlayerCounter[id] = 0
  remove_task
(id TASKID_make_ejaculate)
  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"0.0ATTN_NORM0PITCH_NORM)

Responder
#10
(18/10/2020, 03:54 AM)+rdNN! escribió: Prueba

Código PHP:
/*************************************************************************************************************

  Plugin: AMX Ejaculate
  Version: 0.2
  Author: KRoT@L

  0.1  Release
  0.2  Improved the code
       Renamed cvar amx_maxejaculations into "amx_ejaculate_max"
       Renamed cvar amx_ejaculate_admin into "amx_ejaculate_admins"
       Added cvars amx_ejaculate_active and amx_ejaculate_range
       Removed #define NO_CS_CZ (you can now ejaculate anywhere if "amx_ejaculate_range" is lower than 30)
       Added #define PRINT_TYPE to be able to change the type of information message (print_console or print_chat)


  Commands:

    ejaculate - ejaculates on a dead body or anywhere
    say /ejaculate_help - displays ejaculate help

    To ejaculate on a dead body or anywhere you have to bind a key to "ejaculate".
    Open your console and type: bind "key" "ejaculate"
    Example: bind "x" "ejaculate"
    Then stand still above a dead player, press your key and you'll ejaculate on him!
    You can control the direction of the semen with your mouse!

    Players can write "/ejaculate_help" in the chat to get some help.


  Cvars:

    amx_ejaculate_active <0|1> - disable/enable the plugin (default: 1)

    amx_ejaculate_admins <0|1> - disable/enable the usage of the plugin only for admins (default: 0)

    amx_ejaculate_max "3" - maximum number of times a player is allowed to ejaculate per each spawning

    amx_ejaculate_range "80" - maximum range between a dead body and a player who wants ejaculate (must be between 30 and 300)
    Note: Set to a value lower than 30 (MIN_RANGE) to be able to ejaculate anywhere you want.


  Requirement:

    AMX Mod 2010.1 or higher.


*************************************************************************************************************/

/******************************************************************************/
// If you change one of the following settings, do not forget to recompile
// the plugin and to install the new .amx file on your server.
// You can find the list of admin flags in the amx/examples/include/amxconst.inc file.

#define FLAG_EJACULATE      ADMIN_ALL
#define FLAG_EJACULATE_HELP ADMIN_ALL

// Mode of print for ejaculate info messages from the "ejaculate" command.
// Values are either "print_console", "print_chat" or "print_center".
#define PRINT_TYPE print_chat

// Edit here the minimal & maximal range value in units.
// Notes: This is used to check the distance between a player who wants ejaculate on a dead body.
// If the cvar "amx_ejaculate_range" is lower than MIN_RANGE, players can ejaculate anywhere.
#define MIN_RANGE 30
#define MAX_RANGE 300

/******************************************************************************/

#include <amxmodx>
#include <amxmisc>

new g_iPlayerCounter[33]
new 
g_iPlayerEjaculationsNum[33]
new 
g_iPlayerOrigins[33][3]

new 
g_cvarAmxEjaculateActive
new g_cvarAmxEjaculateAdmins
new g_cvarAmxEjaculateMax
new g_cvarAmxEjaculateRange

#define MAX_COUNTER 10
#define TASKID_make_ejaculate 37931975

public plugin_precache() {
  new const 
szSoundFile[] = "sound/ejaculate/ejaculate.wav"
  
if(file_exists(szSoundFile)) {
    
precache_sound(szSoundFile[6])
  }
  else {
    
log_amx("AMX Ejaculate: WARNING! Sound file ^"%s^" doesn't exist on the server."szSoundFile)
  }
}

public 
plugin_init() {
  
register_plugin("AMX Ejaculate","0.2","KRoT@L")
  
register_clcmd("ejaculate""ejaculate_on_player"FLAG_EJACULATE"- ejaculates on a dead body or anywhere")
  
register_clcmd("say /ejaculate_help""ejaculate_help"FLAG_EJACULATE_HELP"- displays ejaculate help")
  
g_cvarAmxEjaculateActive register_cvar("amx_ejaculate_active""1")
  
g_cvarAmxEjaculateAdmins register_cvar("amx_ejaculate_admins""0")
  
g_cvarAmxEjaculateMax register_cvar("amx_ejaculate_max""3")
  
g_cvarAmxEjaculateRange register_cvar("amx_ejaculate_range""80")
  
register_event("ResetHUD""reset_hud""be")
  
register_event("DeathMsg""death_event""a")
}

public 
client_putinserver(id) {
  
g_iPlayerCounter[id] = 0
  g_iPlayerEjaculationsNum
[id] = 0
}

public 
client_disconnected(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }
}

public 
ejaculate_on_player(idiLevel) {
  if(!
access(idiLevel)) {
    
console_print(id"You have no access to that command.")
    return 
PLUGIN_HANDLED
  
}

  if(
g_iPlayerCounter[id]) {
    
client_print(idPRINT_TYPE"You are already in ejaculating.")
    return 
PLUGIN_HANDLED
  
}

  if(
get_pcvar_num(g_cvarAmxEjaculateActive) <= 0) {
    
client_print(idPRINT_TYPE"The plugin ^"AMX Ejaculate^" is disabled.")
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateRange
  
if(get_pcvar_num(g_cvarAmxEjaculateAdmins) > && !is_user_admin(id)) {
    if((
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)) >= MIN_RANGE) {
      
client_print(idPRINT_TYPE"Only admins can ejaculate on a dead body.")
    }
    else {
      
client_print(idPRINT_TYPE"Only admins can ejaculate.")
    }
    return 
PLUGIN_HANDLED
  
}

  if(!
is_user_alive(id)) {
    
client_print(idPRINT_TYPE"You can't ejaculate when you are dead.")
    return 
PLUGIN_HANDLED
  
}

  new 
iEjaculateMax get_pcvar_num(g_cvarAmxEjaculateMax)
  if(
g_iPlayerEjaculationsNum[id] >= iEjaculateMax) {
    
client_print(idPRINT_TYPE"You can't ejaculate more than %d time(s) per each spawning."iEjaculateMax)
    return 
PLUGIN_HANDLED
  
}

  
iEjaculateRange get_pcvar_num(g_cvarAmxEjaculateRange)
  if(
iEjaculateRange >= MIN_RANGE) {
    new 
iOrigin[3], iPlayers[32], iPlayersNumiPlayer
    
new iCurrentDistanceiDeadBodyiMinDistance clamp(iEjaculateRangeMIN_RANGEMAX_RANGE)

    if(
iEjaculateRange MAX_RANGE) {
      
set_cvar_num("amx_ejaculate_range"MAX_RANGE)
    }
    
get_user_origin(idiOrigin)
    
get_players(iPlayersiPlayersNum"bh")

    for(--
iPlayersNumiPlayersNum >= 0iPlayersNum--) {
      
iPlayer iPlayers[iPlayersNum]
      
iCurrentDistance get_distance(iOriging_iPlayerOrigins[iPlayer])
      if(
iCurrentDistance iMinDistance) {
        
iMinDistance iCurrentDistance
        iDeadBody 
iPlayer
      
}
    }

    if(
iDeadBody 0) {
      new 
szPlayerName[32]
      
get_user_name(iDeadBodyszPlayerNamecharsmax(szPlayerName))

      if((
get_user_flags(iDeadBody) & ADMIN_IMMUNITY) && (get_user_flags(id) & ADMIN_IMMUNITY) == 0) {
        
client_print(idPRINT_TYPE"Player ^"%s^" has immunity."szPlayerName)
        return 
PLUGIN_HANDLED
      
}

      new 
szName[32]
      
get_user_name(idszNamecharsmax(szName))
      
client_print(0print_chat"%s Is Ejaculating On %s's Dead Body!! MuHaHaHaHa!!"szNameszPlayerName)
    }
    else {
      
client_print(idPRINT_TYPE"There is no dead body around you.")
      return 
PLUGIN_HANDLED
    
}
  }
  else {
    new 
szName[32]
    
get_user_name(idszNamecharsmax(szName))
    
client_print(0print_chat"%s Is Ejaculating!"szName)
  }

  
g_iPlayerCounter[id] = 1
  g_iPlayerEjaculationsNum
[id]++

  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"1.0ATTN_NORM0PITCH_NORM)
  
set_task(1.0"make_ejaculate"id TASKID_make_ejaculate__"a"MAX_COUNTER 1)

  return 
PLUGIN_HANDLED
}

public 
ejaculate_help(idiLevel) {
  new 
szArgs[24]
  new 
iArgsLen read_args(szArgscharsmax(szArgs))
  new 
iPrintType = (szArgs[0] == '"' && szArgs[iArgsLen 1] == '"') ? print_chat print_console

  
if(!access(idiLevel)) {
    
client_print(idiPrintType"You have no access to that command.")
    return 
PLUGIN_HANDLED
  
}

  
client_print(idiPrintType"To ejaculate on a dead body or anywhere you have to bind a key to ^"ejaculate^".")
  
client_print(idiPrintType"Open your console and write: bind ^"key^" ^"ejaculate^"")
  
client_print(idiPrintType"Example: bind ^"x^" ^"ejaculate^"")

  return 
PLUGIN_HANDLED
}

public 
make_ejaculate(id) {
  
id -= TASKID_make_ejaculate

  
new iOrigin[3], iVelocity[3], Float:fVelocity[3]
  
get_user_origin(idiOrigin)
  
velocity_by_aim(id3fVelocity)
  
FVecIVec(fVelocityiVelocity)

  
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
  
write_byte(TE_BLOODSTREAM)
  
write_coord(iOrigin[0])
  
write_coord(iOrigin[1])
  
write_coord(iOrigin[2])
  
write_coord(iVelocity[0])
  
write_coord(iVelocity[1])
  
write_coord(iVelocity[2])
  
write_byte(6// color
  
write_byte(165// speed
  
message_end()

  if(++
g_iPlayerCounter[id] == MAX_COUNTER 1) {
    
g_iPlayerCounter[id] = 0
  
}
}

public 
reset_hud(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_ejaculate(id)
  }

  
g_iPlayerEjaculationsNum[id] = 0
}

public 
death_event() {
  new 
victim read_data(2)
  
get_user_origin(victimg_iPlayerOrigins[victim], 0)

  if(
g_iPlayerCounter[victim]) {
    
reset_ejaculate(victim)
  }
}

reset_ejaculate(id) {
  
g_iPlayerCounter[id] = 0
  remove_task
(id TASKID_make_ejaculate)
  
emit_sound(idCHAN_VOICE"ejaculate/ejaculate.wav"0.0ATTN_NORM0PITCH_NORM)

Hice bien el que le puso yo?
Responder
#11
ya amigo lo probare

gracias chicos por la ayuda

chicos creen que tenga que hacer otro post para este plugins ? es de mismo persona pero es otro
quitarle esto para que funcione
#include <translator>

Código PHP:
/*************************************************************************************************************

  Plugin: AMX Puke
  Version: 0.3
  Author: KRoT@L

  0.1  Release
  0.2  Added another sound
  0.3  Improved the code
       Renamed cvar amx_maxpukes into "amx_puke_max"
       Renamed cvar amx_puke_admin into "amx_puke_admins"
       Added cvars amx_puke_active and amx_puke_range
       Removed #define NO_CS_CZ (you can now puke anywhere if "amx_puke_range" is lower than 30)
       Added #define PRINT_TYPE to be able to change the type of information message (print_console or print_chat)


  Commands:

    puke - pukes on a dead body or anywhere
    say /puke_help - displays puke help

    To puke on a dead body or anywhere you have to bind a key to "puke".
    Open your console and type: bind "key" "puke"
    Example: bind "x" "puke"
    Then stand still above a dead player, press your key and you'll puke on him!
    You can control the direction of the stream with your mouse!

    Players can write "/puke_help" in the chat to get some help.


  Cvars:

    amx_puke_active <0|1> - disable/enable the plugin (default: 1)

    amx_puke_admins <0|1> - disable/enable the usage of the plugin only for admins (default: 0)

    amx_puke_max "3" - maximum number of times a player is allowed to puke per each spawning

    amx_puke_range "80" - maximum range between a dead body and a player who wants puke (must be between 30 and 300)
    Note: Set to a value lower than 30 (MIN_RANGE) to be able to puke anywhere you want.


  Requirement:

    AMX Mod 2010.1 or higher.


************************************************************************************************************/

/******************************************************************************/
// If you change one of the following settings, do not forget to recompile
// the plugin and to install the new .amx file on your server.
// You can find the list of admin flags in the amx/examples/include/amxconst.inc file.

#define FLAG_PUKE      ADMIN_ALL
#define FLAG_PUKE_HELP ADMIN_ALL

// Mode of print for puke info messages from the "puke" command.
// Values are either "print_console", "print_chat" or "print_center".
#define PRINT_TYPE print_chat

// Edit here the minimal & maximal range value in units.
// Notes: This is used to check the distance between a player who wants puke on a dead body.
// If the cvar "amx_puke_range" is lower than MIN_RANGE, players can puke anywhere.
#define MIN_RANGE 30
#define MAX_RANGE 300

// Puke sounds files.
new const g_szSoundFiles[][] = {"sound/puke/puke.wav""sound/puke/puke2.wav"}

/******************************************************************************/

#include <translator>
#include <amxmod>
#include <amxmisc>

new g_iPlayerCounter[33]
new 
g_iPlayerPukeNum[33]
new 
g_iPlayerOrigins[33][3]

new 
g_cvarAmxPukeActive
new g_cvarAmxPukeAdmins
new g_cvarAmxPukeMax
new g_cvarAmxPukeRange

#define MAX_COUNTER 10
#define TASKID_make_puke 37931976

public plugin_precache() {
  
load_translations("amx_puke")

  for(new 
0sizeof(g_szSoundFiles); i++) {
    if(
file_exists(g_szSoundFiles[i])) {
      
precache_sound(g_szSoundFiles[i][6])
    }
    else {
      
log_amx(_T("AMX Puke: WARNING! Sound file ^"%s^" doesn't exist on the server."), g_szSoundFiles[i])
    }
  }
}

public 
plugin_init() {
  
register_plugin(_T("AMX Puke"),"0.3","KRoT@L")
  
register_clcmd("puke""puke_on_player"FLAG_PUKE_T("- pukes on a dead body or anywhere"))
  
register_clcmd("say /puke_help""puke_help"FLAG_PUKE_HELP_T("- displays puke help"))
  
g_cvarAmxPukeActive register_cvar("amx_puke_active""1")
  
g_cvarAmxPukeAdmins register_cvar("amx_puke_admins""0")
  
g_cvarAmxPukeMax register_cvar("amx_puke_max""3")
  
g_cvarAmxPukeRange register_cvar("amx_puke_range""80")
  
register_event("ResetHUD""reset_hud""be")
  
register_event("DeathMsg""death_event""a")
}

public 
client_putinserver(id) {
  
g_iPlayerCounter[id] = 0
  g_iPlayerPukeNum
[id] = 0
}

public 
client_disconnect(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_puke(id)
  }
}

public 
puke_on_player(idiLevel) {
  if(!
access(idiLevel)) {
    
console_print(id_T("You have no access to that command."))
    return 
PLUGIN_HANDLED
  
}

  if(
g_iPlayerCounter[id]) {
    
client_print(idPRINT_TYPE_T("You are already in puking."))
    return 
PLUGIN_HANDLED
  
}

  if(
get_cvarptr_num(g_cvarAmxPukeActive) <= 0) {
    
client_print(idPRINT_TYPE_T("The plugin ^"AMX Puke^" is disabled."))
    return 
PLUGIN_HANDLED
  
}

  new 
iPukeRange
  
if(get_cvarptr_num(g_cvarAmxPukeAdmins) > && !is_user_realadmin(id)) {
    if((
iPukeRange get_cvarptr_num(g_cvarAmxPukeRange)) >= MIN_RANGE) {
      
client_print(idPRINT_TYPE_T("Only admins can puke on a dead body."))
    }
    else {
      
client_print(idPRINT_TYPE_T("Only admins can puke."))
    }
    return 
PLUGIN_HANDLED
  
}

  if(!
is_user_alive(id)) {
    
client_print(idPRINT_TYPE_T("You can't puke when you are dead."))
    return 
PLUGIN_HANDLED
  
}

  new 
iPukeMax get_cvarptr_num(g_cvarAmxPukeMax)
  if(
g_iPlayerPukeNum[id] >= iPukeMax) {
    
client_print(idPRINT_TYPE_T("You can't puke more than %d time(s) per each spawning."), iPukeMax)
    return 
PLUGIN_HANDLED
  
}

  
iPukeRange get_cvarptr_num(g_cvarAmxPukeRange)
  if(
iPukeRange >= MIN_RANGE) {
    new 
iOrigin[3], iPlayers[32], iPlayersNumiPlayer
    
new iCurrentDistanceiDeadBodyiMinDistance clamp(iPukeRangeMIN_RANGEMAX_RANGE)

    if(
iPukeRange MAX_RANGE) {
      
set_cvar_num("amx_puke_range"MAX_RANGE)
    }

    
get_user_origin(idiOrigin)
    
get_players(iPlayersiPlayersNum"bh")

    for(--
iPlayersNumiPlayersNum >= 0iPlayersNum--) {
      
iPlayer iPlayers[iPlayersNum]
      
iCurrentDistance get_distance(iOriging_iPlayerOrigins[iPlayer])
      if(
iCurrentDistance iMinDistance) {
        
iMinDistance iCurrentDistance
        iDeadBody 
iPlayer
      
}
    }

    if(
iDeadBody 0) {
      new 
szPlayerName[32]
      
get_user_name(iDeadBodyszPlayerNamecharsmax(szPlayerName))

      if((
get_user_flags(iDeadBody) & ADMIN_IMMUNITY) && (get_user_flags(id) & ADMIN_SUPREME) == 0) {
        
client_print(idPRINT_TYPE_T("Player ^"%s^" has immunity."), szPlayerName)
        return 
PLUGIN_HANDLED
      
}

      new 
szName[32]
      
get_user_name(idszNamecharsmax(szName))
      
client_print(0print_chat_T("%s Is Puking On %s's Dead Body!! MuHaHaHaHa!!"), szNameszPlayerName)
    }
    else {
      
client_print(idPRINT_TYPE_T("There is no dead body around you."))
      return 
PLUGIN_HANDLED
    
}
  }
  else {
    new 
szName[32]
    
get_user_name(idszNamecharsmax(szName))
    
client_print(0print_chat_T("%s Is Puking!"), szName)
  }

  
g_iPlayerCounter[id] = 1
  g_iPlayerPukeNum
[id]++

  
emit_sound(idCHAN_VOICEg_szSoundFiles[random(sizeof(g_szSoundFiles))][6], 1.0ATTN_NORM0PITCH_NORM)
  
set_task(0.3"make_puke"id TASKID_make_puke__"a"MAX_COUNTER 1)

  return 
PLUGIN_HANDLED
}

public 
puke_help(idiLevel) {
  new 
szArgs[18]
  new 
iArgsLen read_args(szArgscharsmax(szArgs))
  new 
iPrintType = (szArgs[0] == '"' && szArgs[iArgsLen 1] == '"') ? print_chat print_console

  
if(!access(idiLevel)) {
    
client_print(idiPrintType_T("You have no access to that command."))
    return 
PLUGIN_HANDLED
  
}

  
client_print(idiPrintType_T("To puke on a dead body or anywhere you have to bind a key to ^"puke^"."))
  
client_print(idiPrintType_T("Open your console and write: bind ^"key^" ^"puke^""))
  
client_print(idiPrintType_T("Example: bind ^"x^" ^"puke^""))

  return 
PLUGIN_HANDLED
}

public 
make_puke(id) {
  
id -= TASKID_make_puke

  
new iOrigin[3], iVelocity[3], Float:fVelocity[3]
  
get_user_origin(idiOrigin1)
  
iOrigin[2] -= 4
  VelocityByAim
(id3fVelocity)
  
FVecIVec(fVelocityiVelocity)

  
message_begin(MSG_PVSSVC_TEMPENTITYiOrigin)
  
write_byte(TE_BLOODSTREAM)
  
write_coord(iOrigin[0])
  
write_coord(iOrigin[1])
  
write_coord(iOrigin[2])
  
write_coord(iVelocity[0])
  
write_coord(iVelocity[1])
  
write_coord(iVelocity[2])
  
write_byte(82// color
  
write_byte(165// speed
  
message_end()

  if(++
g_iPlayerCounter[id] == MAX_COUNTER 1) {
    
g_iPlayerCounter[id] = 0
  
}
}

public 
reset_hud(id) {
  if(
g_iPlayerCounter[id]) {
    
reset_puke(id)
  }

  
g_iPlayerPukeNum[id] = 0
}

public 
death_event() {
  new 
victim read_data(2)
  
get_user_origin(victimg_iPlayerOrigins[victim], 0)

  if(
g_iPlayerCounter[victim]) {
    
reset_puke(victim)
  }
}

reset_puke(id) {
  
g_iPlayerCounter[id] = 0
  remove_task
(id TASKID_make_puke)
  
emit_sound(idCHAN_VOICEg_szSoundFiles[0][6], 0.0ATTN_NORM0PITCH_NORM)

Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)