busco plugin cagar
#1
hola busco plugin cagar no lo pillo
Responder
#2
Código PHP:
/////TakeADookie -by PaintLancer (paintlancer@hotmail.com)

// What it is:
//             Enables players to "Take A Dookie" on the dead bodies of other players

// Cvars:
//        amx_dookie "2" (sets the amount of dookies per round you can take)
//        amx_superdookie "2" (the amount of headshots it takes to turn a dookie into a superdookie)

// History:
//          I made this plugin many months ago for AMX and thought
//          it would be too stupid to release... but I've had a bunch of
//          server admins ask me for it saying the searched the net but
//          couldn't find it so..

#include <amxmodx>
#include <fakemeta>

#define MAX_PLAYERS 32

new const DOOKIE_CLASSNAME[] = "amx_dookie"
new const DOOKIE_MODEL1[] = "models/dookie2.mdl"
new const DOOKIE_MODEL2[] = "models/dookie3.mdl"
new const DOOKIE_SOUND1[] = "dookie/dookie1.wav"
new const DOOKIE_SOUND2[] = "dookie/dookie3.wav"
new const STEAM_SPRITE[] = "sprites/xsmoke3.spr"
new const SMOKE_SPRITE[] = "sprites/steam1.spr"

new Float:pl_origins[MAX_PLAYERS+1][3]
new 
pl_dookied[MAX_PLAYERS+1]
new 
hs_counter[MAX_PLAYERS+1]
new 
steamsprite
new smoke

new gmsgShake
new bool:g_RestartAttempt[MAX_PLAYERS+1]
new 
amx_dookieamx_superdookie

public plugin_precache(){
    
engfunc(EngFunc_PrecacheSoundDOOKIE_SOUND1)
    
engfunc(EngFunc_PrecacheSoundDOOKIE_SOUND2)
    
engfunc(EngFunc_PrecacheModelDOOKIE_MODEL1)
    
engfunc(EngFunc_PrecacheModelDOOKIE_MODEL2)
    
steamsprite engfunc(EngFunc_PrecacheModelSTEAM_SPRITE)
    
smoke engfunc(EngFunc_PrecacheModelSMOKE_SPRITE)
}

public 
plugin_init()
{
    
register_plugin("TakeADookie""2.3""PaintLancer"// conversion amxx : ConnorMcLeod
    
register_dictionary("dookie.txt")

    
register_clcmd("takeadookie""take_a_dookie")
    
register_clcmd("defequer""take_a_dookie")

    
register_clcmd("say /dookie""do_help"0"- Displays dookie help")
    
register_clcmd("say /defequer""do_help"0"- Affiche l'aide du plugin pour defequer")
    
register_clcmd("say""HandleSay")
    
register_clcmd("clcmd_fullupdate""fullupdateCmd")

    
register_forward(FM_Think"fwdThink")

    
register_event("TextMsg""eRestartAttempt""a""2=#Game_will_restart_in")
    
register_event("ResetHUD""eResetHUD""be")
    
register_event("DeathMsg","eDeathMsg""a")

    
gmsgShake get_user_msgid("ScreenShake")

    
amx_dookie register_cvar("amx_dookie""2")
    
amx_superdookie register_cvar("amx_superdookie""2")
}

public 
fullupdateCmd() {
    return 
PLUGIN_HANDLED_MAIN
}

public 
eRestartAttempt() {
    new 
players[32], num
    get_players
(playersnum"a")
    for (new 
inum; ++i)
        
g_RestartAttempt[players[i]] = true
}

public 
eResetHUD(id) {
    if (
g_RestartAttempt[id]) {
        
g_RestartAttempt[id] = false
        
return
    }
    
KillDookie(id)
}

public 
take_a_dookie(id) {
    new 
dookie get_pcvar_num(amx_dookie)
    if(!
dookie)
        return 
PLUGIN_HANDLED
    
if (!is_user_alive(id))
        return 
PLUGIN_HANDLED

    
if (pl_dookied[id] > dookie) {
        
client_print(idprint_chat"%L"id"DOOKIE_ONLY"dookie)
        return 
PLUGIN_HANDLED
    
}

    new 
Float:cur_origin[3], players[MAX_PLAYERS], playerpl_numFloat:distFloat:last_dist=99999.0last_id

    pev
(idpev_origincur_origin)
    
get_players(playerspl_num"b")

    if(!
pl_num) {
        
client_print(idprint_chat"%L"id"DOOKIE_NODEADS")
        return 
PLUGIN_HANDLED
    
}
        
    for (new 
i=0;i<pl_num;i++) {
        
player players[i]
        if (
player!=id) {
            
dist get_distance_f(cur_origin,pl_origins[player])
            if (
dist<last_dist) {
                
last_id player
                last_dist 
dist
            
}
        }
    }
    if(
last_dist<80.0) {        
        new 
superdookie get_pcvar_num(amx_superdookie)
        if(
hs_counter[id] >= superdookie)
         {
            
hs_counter[id] -= superdookie
             
++pl_dookied[id]

            new 
Float:origin[3]
            
pev(idpev_originorigin)

            
engfunc(EngFunc_EmitSoundidCHAN_VOICEDOOKIE_SOUND2VOL_NORMATTN_NORM0PITCH_NORM)

            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(TE_SMOKE)
            
engfunc(EngFunc_WriteCoordorigin[0])
            
engfunc(EngFunc_WriteCoordorigin[1])
            
engfunc(EngFunc_WriteCoordorigin[2])
            
write_short(smoke)
            
write_byte(60)
            
write_byte(5)
            
message_end()

            new 
dookier[32], dookied[32]
            
get_user_name(last_iddookied31)
            
get_user_name(iddookier31)
            
CreateSuperDookie(id)
            
client_print(0,print_chat,"%L"LANG_PLAYER"DOOKIE_SUPER"dookierdookied)
            return 
PLUGIN_HANDLED
        
}
        else
        {
            ++
pl_dookied[id]
            new 
Float:origin[3]
            
pev(idpev_originorigin)

            
engfunc(EngFunc_EmitSoundidCHAN_VOICEDOOKIE_SOUND1VOL_NORMATTN_NORM0PITCH_NORM)

            
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
            
write_byte(TE_SMOKE)
            
engfunc(EngFunc_WriteCoordorigin[0])
            
engfunc(EngFunc_WriteCoordorigin[1])
            
engfunc(EngFunc_WriteCoordorigin[2])
            
write_short(smoke)
            
write_byte(60)
            
write_byte(5)
            
message_end()

            new 
dookier[32], dookied[32]
            
get_user_name(last_iddookiedcharsmax(dookied))
            
get_user_name(iddookiercharsmax(dookier))
            
CreateDookie(id)
            
client_print(0print_chat"%L"LANG_PLAYER"DOOKIE_NORM"dookierdookied)
            return 
PLUGIN_HANDLED
        
}
    }
    else
    {
        
client_print(idprint_chat"%L"id"DOOKIE_NODEADS_AROUND")
        return 
PLUGIN_HANDLED
    
}
    
    return 
PLUGIN_HANDLED
}

public 
eDeathMsg() {
    new 
victim read_data(2)
    
pev(victimpev_originpl_origins[victim])
    if(
read_data(3))
        
hs_counter[read_data(1)]++
}

public 
CreateDookie(id){

    new 
Float:origin[3]
    
pev(idpev_originorigin)

    new 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))

    if(!
ent)
        return

    
set_pev(entpev_classnameDOOKIE_CLASSNAME)

    
engfunc(EngFunc_SetModelentDOOKIE_MODEL1)

    new 
Float:MinBox[3]
    new 
Float:MaxBox[3]
    for(new 
aa<3a++) {
        
MinBox[a] = -1.0
        MaxBox
[a] = 1.0
    
}
    
engfunc(EngFunc_SetSizeentMinBoxMaxBox)
    
engfunc(EngFunc_SetOriginentorigin)

    
set_pev(entpev_solidSOLID_SLIDEBOX)
    
set_pev(entpev_movetypeMOVETYPE_TOSS)
    
set_pev(entpev_ownerid)

    new 
Float:global_Time
    global_get
(glb_timeglobal_Time)
    
set_pev(entpev_nextthinkglobal_Time 1.0)
}

public 
CreateSuperDookie(id){

    new 
Float:origin[3]
    
pev(idpev_originorigin)

    new 
ent
    ent 
engfunc(EngFunc_CreateNamedEntityengfunc(EngFunc_AllocString"info_target"))

    if(!
ent)
        return

    
set_pev(entpev_classnameDOOKIE_CLASSNAME)

    
engfunc(EngFunc_SetModelentDOOKIE_MODEL2)

    new 
Float:MinBox[3]
    new 
Float:MaxBox[3]

    for(new 
aa<3a++) {
        
MinBox[a] = -1.0
        MaxBox
[a] = 1.0
    
}

    
engfunc(EngFunc_SetSizeentMinBoxMaxBox)
    
engfunc(EngFunc_SetOriginentorigin)

    
set_pev(entpev_solidSOLID_SLIDEBOX)
    
set_pev(entpev_movetypeMOVETYPE_TOSS)
    
set_pev(entpev_ownerid)

    
//shake
    
new all[MAX_PLAYERS], all_num
    get_players
(allall_num"a")

    for (new 
i=0;i<all_num;i++)
    {
        
message_begin(MSG_ONEgmsgShake_all[i])
        
write_short(1<<15// shake amount
        
write_short(1<<11// shake lasts this long
        
write_short(1<<15// shake noise frequency
        
message_end()
    }

    
//poo matter
    
for (new 010j++)
    {
        
message_begin(MSG_BROADCAST,SVC_TEMPENTITY)
        
write_byte(TE_BLOODSTREAM)
        
engfunc(EngFunc_WriteCoordorigin[0])
        
engfunc(EngFunc_WriteCoordorigin[1])
        
engfunc(EngFunc_WriteCoordorigin[2] - 20.0)
        
write_coord(random_num(-100,100)) // x
        
write_coord(random_num(-100,100)) // y
        
write_coord(random_num(20,300)) // z
        
write_byte(100// color
        
write_byte(random_num(100,200)) // speed
        
message_end()
    }

    new 
Float:global_Time
    global_get
(glb_timeglobal_Time)
    
set_pev(entpev_nextthinkglobal_Time 1.0)

}

public 
fwdThink(ent) {
    if(!
pev_valid(ent))
        return 
FMRES_IGNORED

    
static classname[33]
    
pev(entpev_classnameclassnamecharsmax(classname))

    if(!
equal(classnameDOOKIE_CLASSNAME))
        return 
FMRES_IGNORED

    DookieSteam
(ent)
    new 
Float:global_Time
    global_get
(glb_timeglobal_Time)
    
set_pev(entpev_nextthinkglobal_Time 1.0)
    return 
FMRES_HANDLED
}

public 
KillDookie(id){
    new 
iCurrent = -1

    
while((iCurrent engfunc(EngFunc_FindEntityByStringiCurrent"classname"DOOKIE_CLASSNAME)) > 0) {
        if(
pev(iCurrentpev_owner) == id)
            
engfunc(EngFunc_RemoveEntityiCurrent)
    }

    
pl_dookied[id] = 1
}

public 
DookieSteam(ent)
{
    new 
Float:origin[3]
    
pev(entpev_originorigin)

    
message_begin(MSG_BROADCASTSVC_TEMPENTITY)
    
write_byte(TE_SPRITE)
    
engfunc(EngFunc_WriteCoordorigin[0])
    
engfunc(EngFunc_WriteCoordorigin[1])
    
engfunc(EngFunc_WriteCoordorigin[2] + 10.0)
    
write_short(steamsprite)
    
write_byte(8)
    
write_byte(10)
    
message_end()
}

public 
do_help(id){

  new len 1300
  
new buffer[1301]
  new title[20]
  new 0

  n 
+= formatexbuffer[n],len-n"<html><head><style type=^"text/css^">pre{color:#FFB000;}body{background:#000000;margin-left:8px;margin-top:0px;}</style></head><body><pre>")

  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD1")

  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD2")
  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD3")

  n += formatexbuffer[n],len-n"ex:^n^n")
  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD4")

  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD5")
  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD6"get_pcvar_num(amx_superdookie))
  n += formatexbuffer[n],len-n"%L"id"DOOKIE_MOTD7")

  n += formatexbuffer[n],len-n"</pre></body></html>")

  formatex(titlecharsmax(title), "%L"id"DOOKIE_MOTD_TITLE")
  show_motd(idbuffertitle)
  return PLUGIN_CONTINUE
}

public 
HandleSay(id) {
  new Speech[192]
  read_args(Speech,192)
  remove_quotes(Speech)

  if( (containi(Speech"dookie") != -1) || (containi(Speech"takeadookie") != -1) || (containi(Speech"defequer") != -1) ) {
    client_print(id,print_chat"%L"id"DOOKIE_HELP")
  }

  return PLUGIN_CONTINUE



Archivos adjuntos
.zip   Recursos.zip (Tamaño: 30 KB / Descargas: 2)
"Cada golpe es una lección, y cada lección te hace mejor."

[Imagen: b_350_20_000000_8a7300_ffffff_eeff00.png]
[Imagen: 76561198371193937.png]
Responder
#3
se le puede poner un acceso de admin ?

por ejemplo admin_inmunity ?
Responder


Salto de foro:


Usuarios navegando en este tema: 1 invitado(s)