Voy a poner algunos plugins que os pueden ser utiles no hecho por mi.
(abre las celdas/puertas de todo el mapa creo //No lo probe//) Abrir Puertas:
(Puedes crear una pelota soccejam cargarla y borrarla) Pelota Jail:
(cuando matas a un CT no sale quien lo mato pero si el CT que murio)No se ve cuando TT matan:
(Registra al jugador Terrorista y le encuentra lo que lleve ensima(Armas,C4,Flash...) Cachear:
(Te da dinero si te toca o no te da nada) Loteria:
(Sale el dia que es y el motivo ejemplo: Dia: Martes - Motivo: Meterte con los scripter de alliedmodders-es) Dia & Motivo:
(Menu para darle dia libre a un jugador selecionado o a todos) Menu Freeday:
(Te sale un menu namas empezar la ronda para selecionar ARMAS) Menu armas:
Post cojido de ExTrEmOdUrO.
(abre las celdas/puertas de todo el mapa creo //No lo probe//) Abrir Puertas:
Código PHP:
#include <amxmodx>
#include <engine>
new g_open_doors;
public plugin_init()
{
new g_plugin_name[] = "[JB] Abrir Puertas";
new g_plugin_version[] = "v1.0.0";
new g_plugin_author[] = "Kiske";
register_plugin(g_plugin_name, g_plugin_version, g_plugin_author);
register_event("HLTV", "event_HLTV", "a", "1=0", "2=0");
register_clcmd("say /abrir", "clcmd_OpenDoors");
}
public event_HLTV()
{
g_open_doors = 0;
}
public clcmd_OpenDoors(id)
{
if(!is_user_alive(id) || g_open_doors)
return PLUGIN_HANDLED;
static name[32];
get_user_name(id, name, charsmax(name));
if(cs_get_user_team(id) == CS_TEAM_CT)
{
ChatColor(0, "!t[!gJailBreak!t] !nEl Policia !g%s !nA Abierto Las Celdas De Los Presos", name);
fn_open_doors(id);
}
else if(get_user_flags(id) & ADMIN_KICK)
{
ChatColor(0, "!t[!gJailBreak!t] !nEl Administrador !g%s !nA Abierto Las Celdas De Los Presos", name);
fn_open_doors(id);
}
return PLUGIN_HANDLED;
}
fn_open_doors(id)
{
static entity;
while((entity = find_ent_by_class(entity, "func_door_rotating")) != 0) force_use(id, entity);
while((entity = find_ent_by_class(entity, "func_door")) != 0) force_use(id, entity);
g_open_doors = 1;
}
(Puedes crear una pelota soccejam cargarla y borrarla) Pelota Jail:
Código PHP:
#include < amxmodx >
#include < engine >
#include < fakemeta >
#include < hamsandwich >
#include < fun >
static const BALL_BOUNCE_GROUND[ ] = "kickball/bounce.wav";
static const g_szBallModel[ ] = "models/kickball/ball.mdl";
static const g_szBallName[ ] = "ball";
new g_iBall, g_szFile[ 128 ], g_szMapname[ 32 ], g_iButtonsMenu, g_iTrailSprite;
new bool:g_bNeedBall, cSpeed, cDistance;
new Float:g_vOrigin[ 3 ];
public plugin_init( ) {
register_plugin( "Jailbreak | Football", "1.0", "xPaw" );
/* Cvars */
cSpeed = register_cvar("football_speed", "200.0");
cDistance = register_cvar("football_distance", "520");
/* Register Forward */
register_forward(FM_PlayerPreThink, "PlayerPreThink", 0)
/* Current Weapon */
register_event("CurWeapon", "CurWeapon", "be");
RegisterHam( Ham_ObjectCaps, "player", "FwdHamObjectCaps", 1 );
register_logevent( "EventRoundStart", 2, "1=Round_Start" );
register_think( g_szBallName, "FwdThinkBall" );
register_touch( g_szBallName, "player", "FwdTouchPlayer" );
new const szEntity[ ][ ] = {
"worldspawn", "func_wall", "func_door", "func_door_rotating",
"func_wall_toggle", "func_breakable", "func_pushable", "func_train",
"func_illusionary", "func_button", "func_rot_button", "func_rotating"
}
for( new i; i < sizeof szEntity; i++ )
register_touch( g_szBallName, szEntity[ i ], "FwdTouchWorld" );
g_iButtonsMenu = menu_create( "[JB-W] Balon", "HandleButtonsMenu" );
menu_additem( g_iButtonsMenu, "Crear Balon", "1" );
menu_additem( g_iButtonsMenu, "Poner Balon en Posicion Inicial", "2" );
menu_additem( g_iButtonsMenu, "Eliminar Balon", "3" );
menu_additem( g_iButtonsMenu, "Guardar", "4" );
register_clcmd( "say /balon", "CmdButtonsMenu", ADMIN_KICK );
register_clcmd( "say /balonini", "UpdateBall" );
}
public PlayerPreThink(id) {
if(!is_user_alive(id))
return PLUGIN_CONTINUE;
if( is_valid_ent( g_iBall ) ) {
static iOwner; iOwner = pev( g_iBall, pev_iuser1 );
if( iOwner != id )
set_user_maxspeed(id, 230.0)
}
return PLUGIN_HANDLED;
}
public CurWeapon(id) {
if(!is_user_alive(id))
return PLUGIN_CONTINUE;
if( is_valid_ent( g_iBall ) ) {
static iOwner; iOwner = pev( g_iBall, pev_iuser1 );
if( iOwner == id )
set_user_maxspeed(id, get_pcvar_float(cSpeed))
}
return PLUGIN_HANDLED;
}
public UpdateBall( id ) {
if( !id || get_user_flags( id ) & ADMIN_KICK ) {
if( is_valid_ent( g_iBall ) ) {
entity_set_vector( g_iBall, EV_VEC_velocity, Float:{ 0.0, 0.0, 0.0 } ); // To be sure ?
entity_set_origin( g_iBall, g_vOrigin );
entity_set_int( g_iBall, EV_INT_movetype, MOVETYPE_BOUNCE );
entity_set_size( g_iBall, Float:{ -15.0, -15.0, 0.0 }, Float:{ 15.0, 15.0, 12.0 } );
entity_set_int( g_iBall, EV_INT_iuser1, 0 );
}
}
return PLUGIN_HANDLED;
}
public plugin_precache( ) {
precache_model( g_szBallModel );
precache_sound( BALL_BOUNCE_GROUND );
g_iTrailSprite = precache_model( "sprites/laserbeam.spr" );
get_mapname( g_szMapname, 31 );
strtolower( g_szMapname );
// File
new szDatadir[ 64 ];
get_localinfo( "amxx_datadir", szDatadir, charsmax( szDatadir ) );
formatex( szDatadir, charsmax( szDatadir ), "%s", szDatadir );
if( !dir_exists( szDatadir ) )
mkdir( szDatadir );
formatex( g_szFile, charsmax( g_szFile ), "%s/ball.ini", szDatadir );
if( !file_exists( g_szFile ) ) {
write_file( g_szFile, "// Ball Spawn Editor", -1 );
write_file( g_szFile, " ", -1 );
return; // We dont need to load file
}
new szData[ 256 ], szMap[ 32 ], szOrigin[ 3 ][ 16 ];
new iFile = fopen( g_szFile, "rt" );
while( !feof( iFile ) ) {
fgets( iFile, szData, charsmax( szData ) );
if( !szData[ 0 ] || szData[ 0 ] == ';' || szData[ 0 ] == ' ' || ( szData[ 0 ] == '/' && szData[ 1 ] == '/' ) )
continue;
parse( szData, szMap, 31, szOrigin[ 0 ], 15, szOrigin[ 1 ], 15, szOrigin[ 2 ], 15 );
if( equal( szMap, g_szMapname ) ) {
new Float:vOrigin[ 3 ];
vOrigin[ 0 ] = str_to_float( szOrigin[ 0 ] );
vOrigin[ 1 ] = str_to_float( szOrigin[ 1 ] );
vOrigin[ 2 ] = str_to_float( szOrigin[ 2 ] );
CreateBall( 0, vOrigin );
g_vOrigin = vOrigin;
break;
}
}
fclose( iFile );
}
public CmdButtonsMenu( id ) {
if( get_user_flags( id ) & ADMIN_RCON )
menu_display( id, g_iButtonsMenu, 0 );
return PLUGIN_HANDLED;
}
public HandleButtonsMenu( id, iMenu, iItem ) {
if( iItem == MENU_EXIT )
return PLUGIN_HANDLED;
new szKey[ 2 ], _Access, _Callback;
menu_item_getinfo( iMenu, iItem, _Access, szKey, 1, "", 0, _Callback );
new iKey = str_to_num( szKey );
switch( iKey ) {
case 1: {
if( pev_valid( g_iBall ) )
return PLUGIN_CONTINUE;
CreateBall( id );
}
case 2: {
if( is_valid_ent( g_iBall ) ) {
entity_set_vector( g_iBall, EV_VEC_velocity, Float:{ 0.0, 0.0, 0.0 } ); // To be sure ?
entity_set_origin( g_iBall, g_vOrigin );
entity_set_int( g_iBall, EV_INT_movetype, MOVETYPE_BOUNCE );
entity_set_size( g_iBall, Float:{ -15.0, -15.0, 0.0 }, Float:{ 15.0, 15.0, 12.0 } );
entity_set_int( g_iBall, EV_INT_iuser1, 0 );
client_print( id, print_chat, "[JB-W] Balon en posicion inicial!" );
}
}
case 3: {
new iEntity;
while( ( iEntity = find_ent_by_class( iEntity, g_szBallName ) ) > 0 )
remove_entity( iEntity );
client_print( id, print_chat, "[JB-W] Balon eliminado!" );
}
case 4: {
new iBall, iEntity, Float:vOrigin[ 3 ];
while( ( iEntity = find_ent_by_class( iEntity, g_szBallName ) ) > 0 )
iBall = iEntity;
if( iBall > 0 )
entity_get_vector( iBall, EV_VEC_origin, vOrigin );
else
return PLUGIN_HANDLED;
new bool:bFound, iPos, szData[ 32 ], iFile = fopen( g_szFile, "r+" );
if( !iFile )
return PLUGIN_HANDLED;
while( !feof( iFile ) ) {
fgets( iFile, szData, 31 );
parse( szData, szData, 31 );
iPos++;
if( equal( szData, g_szMapname ) ) {
bFound = true;
new szString[ 256 ];
formatex( szString, 255, "%s %f %f %f", g_szMapname, vOrigin[ 0 ], vOrigin[ 1 ], vOrigin[ 2 ] );
write_file( g_szFile, szString, iPos - 1 );
break;
}
}
if( !bFound )
fprintf( iFile, "%s %f %f %f^n", g_szMapname, vOrigin[ 0 ], vOrigin[ 1 ], vOrigin[ 2 ] );
fclose( iFile );
client_print( id, print_chat, "[JB-W] Guardado!" );
}
default: return PLUGIN_HANDLED;
}
menu_display( id, g_iButtonsMenu, 0 );
return PLUGIN_HANDLED;
}
public EventRoundStart( ) {
if( !g_bNeedBall )
return;
if( !is_valid_ent( g_iBall ) )
CreateBall( 0, g_vOrigin );
else {
entity_set_vector( g_iBall, EV_VEC_velocity, Float:{ 0.0, 0.0, 0.0 } ); // To be sure ?
entity_set_origin( g_iBall, g_vOrigin );
entity_set_int( g_iBall, EV_INT_solid, SOLID_BBOX );
entity_set_int( g_iBall, EV_INT_movetype, MOVETYPE_BOUNCE );
entity_set_size( g_iBall, Float:{ -15.0, -15.0, 0.0 }, Float:{ 15.0, 15.0, 12.0 } );
entity_set_int( g_iBall, EV_INT_iuser1, 0 );
}
}
public FwdHamObjectCaps( id ) {
if( pev_valid( g_iBall ) && is_user_alive( id ) ) {
static iOwner; iOwner = pev( g_iBall, pev_iuser1 );
if( iOwner == id )
KickBall( id );
}
}
// BALL BRAIN :)
////////////////////////////////////////////////////////////
public FwdThinkBall( iEntity ) {
if( !is_valid_ent( g_iBall ) )
return PLUGIN_HANDLED;
entity_set_float( iEntity, EV_FL_nextthink, halflife_time( ) + 0.05 );
static Float:vOrigin[ 3 ], Float:vBallVelocity[ 3 ];
entity_get_vector( iEntity, EV_VEC_origin, vOrigin );
entity_get_vector( iEntity, EV_VEC_velocity, vBallVelocity );
static iOwner; iOwner = pev( iEntity, pev_iuser1 );
static iSolid; iSolid = pev( iEntity, pev_solid );
// Trail --- >
static Float:flGametime, Float:flLastThink;
flGametime = get_gametime( );
if( flLastThink < flGametime ) {
if( floatround( vector_length( vBallVelocity ) ) > 10 ) {
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_KILLBEAM );
write_short( g_iBall );
message_end( );
message_begin( MSG_BROADCAST, SVC_TEMPENTITY );
write_byte( TE_BEAMFOLLOW );
write_short( g_iBall );
write_short( g_iTrailSprite );
write_byte( 10 );
write_byte( 10 );
write_byte( 0 );
write_byte( 50 );
write_byte( 255 );
write_byte( 200 );
message_end( );
}
flLastThink = flGametime + 3.0;
}
// Trail --- <
if( iOwner > 0 ) {
static Float:vOwnerOrigin[ 3 ];
entity_get_vector( iOwner, EV_VEC_origin, vOwnerOrigin );
static const Float:vVelocity[ 3 ] = { 1.0, 1.0, 0.0 };
if( !is_user_alive( iOwner ) ) {
entity_set_int( iEntity, EV_INT_iuser1, 0 );
vOwnerOrigin[ 2 ] += 5.0;
entity_set_origin( iEntity, vOwnerOrigin );
entity_set_vector( iEntity, EV_VEC_velocity, vVelocity );
return PLUGIN_CONTINUE;
}
if( iSolid != SOLID_NOT )
set_pev( iEntity, pev_solid, SOLID_NOT );
static Float:vAngles[ 3 ], Float:vReturn[ 3 ];
entity_get_vector( iOwner, EV_VEC_v_angle, vAngles );
vReturn[ 0 ] = ( floatcos( vAngles[ 1 ], degrees ) * 55.0 ) + vOwnerOrigin[ 0 ];
vReturn[ 1 ] = ( floatsin( vAngles[ 1 ], degrees ) * 55.0 ) + vOwnerOrigin[ 1 ];
vReturn[ 2 ] = vOwnerOrigin[ 2 ];
vReturn[ 2 ] -= ( entity_get_int( iOwner, EV_INT_flags ) & FL_DUCKING ) ? 10 : 30;
entity_set_vector( iEntity, EV_VEC_velocity, vVelocity );
entity_set_origin( iEntity, vReturn );
} else {
if( iSolid != SOLID_BBOX )
set_pev( iEntity, pev_solid, SOLID_BBOX );
static Float:flLastVerticalOrigin;
if( vBallVelocity[ 2 ] == 0.0 ) {
static iCounts;
if( flLastVerticalOrigin > vOrigin[ 2 ] ) {
iCounts++;
if( iCounts > 10 ) {
iCounts = 0;
UpdateBall( 0 );
}
} else {
iCounts = 0;
if( PointContents( vOrigin ) != CONTENTS_EMPTY )
UpdateBall( 0 );
}
flLastVerticalOrigin = vOrigin[ 2 ];
}
}
return PLUGIN_CONTINUE;
}
KickBall( id ) {
set_user_maxspeed(id, 230.0)
static Float:vOrigin[ 3 ];
entity_get_vector( g_iBall, EV_VEC_origin, vOrigin );
if( PointContents( vOrigin ) != CONTENTS_EMPTY )
return PLUGIN_HANDLED;
new Float:vVelocity[ 3 ];
velocity_by_aim( id, get_pcvar_num(cDistance), vVelocity );
set_pev( g_iBall, pev_solid, SOLID_BBOX );
entity_set_size( g_iBall, Float:{ -15.0, -15.0, 0.0 }, Float:{ 15.0, 15.0, 12.0 } );
entity_set_int( g_iBall, EV_INT_iuser1, 0 );
entity_set_vector( g_iBall, EV_VEC_velocity, vVelocity );
return PLUGIN_CONTINUE;
}
// BALL TOUCHES
////////////////////////////////////////////////////////////
public FwdTouchPlayer( Ball, id ) {
if( is_user_bot( id ) )
return PLUGIN_CONTINUE;
static iOwner; iOwner = pev( Ball, pev_iuser1 );
if( iOwner == 0 ) {
entity_set_int( Ball, EV_INT_iuser1, id );
set_user_maxspeed(id, get_pcvar_float(cSpeed))
}
return PLUGIN_CONTINUE;
}
public FwdTouchWorld( Ball, World ) {
static Float:vVelocity[ 3 ];
entity_get_vector( Ball, EV_VEC_velocity, vVelocity );
if( floatround( vector_length( vVelocity ) ) > 10 ) {
vVelocity[ 0 ] *= 0.85;
vVelocity[ 1 ] *= 0.85;
vVelocity[ 2 ] *= 0.85;
entity_set_vector( Ball, EV_VEC_velocity, vVelocity );
emit_sound( Ball, CHAN_ITEM, BALL_BOUNCE_GROUND, 1.0, ATTN_NORM, 0, PITCH_NORM );
}
return PLUGIN_CONTINUE;
}
// ENTITIES CREATING
////////////////////////////////////////////////////////////
CreateBall( id, Float:vOrigin[ 3 ] = { 0.0, 0.0, 0.0 } ) {
if( !id && vOrigin[ 0 ] == 0.0 && vOrigin[ 1 ] == 0.0 && vOrigin[ 2 ] == 0.0 )
return 0;
g_bNeedBall = true;
g_iBall = create_entity( "info_target" );
if( is_valid_ent( g_iBall ) ) {
entity_set_string( g_iBall, EV_SZ_classname, g_szBallName );
entity_set_int( g_iBall, EV_INT_solid, SOLID_BBOX );
entity_set_int( g_iBall, EV_INT_movetype, MOVETYPE_BOUNCE );
entity_set_model( g_iBall, g_szBallModel );
entity_set_size( g_iBall, Float:{ -15.0, -15.0, 0.0 }, Float:{ 15.0, 15.0, 12.0 } );
entity_set_float( g_iBall, EV_FL_framerate, 0.0 );
entity_set_int( g_iBall, EV_INT_sequence, 0 );
entity_set_float( g_iBall, EV_FL_nextthink, get_gametime( ) + 0.05 );
client_print( id, print_chat, "[JB-W] Balon Creado!" );
if( id > 0 ) {
new iOrigin[ 3 ];
get_user_origin( id, iOrigin, 3 );
IVecFVec( iOrigin, vOrigin );
vOrigin[ 2 ] += 5.0;
entity_set_origin( g_iBall, vOrigin );
} else
entity_set_origin( g_iBall, vOrigin );
g_vOrigin = vOrigin;
return g_iBall;
}
return -1;
}
(cuando matas a un CT no sale quien lo mato pero si el CT que murio)No se ve cuando TT matan:
Código PHP:
#include <amxmodx>
#include <cstrike>
#define VERSION "0.0.2"
#define IsPlayer(%1) ( 1 <= %1 <= g_iMaxPlayers )
new g_iMaxPlayers
public plugin_init()
{
register_plugin("Jail Hide Ts Kills", VERSION, "ConnorMcLeod")
register_message(get_user_msgid("DeathMsg"), "Message_DeathMsg")
g_iMaxPlayers = get_maxplayers()
}
public Message_DeathMsg()
{
new iKiller = get_msg_arg_int(1)
if( IsPlayer(iKiller) && cs_get_user_team(iKiller) == CS_TEAM_T )
{
set_msg_arg_int(1, ARG_BYTE, get_msg_arg_int(2))
}
}
(Registra al jugador Terrorista y le encuentra lo que lleve ensima(Armas,C4,Flash...) Cachear:
Código PHP:
#include <amxmodx>
#include <engine>
#include <colorchat>
#define PLUGIN "Jailbreak: Cachear"
#define VERSION "1.0"
#define AUTHOR "Peyote"
#define TASK_ID 352
new target[33], body
new bool:w_trakcie[33]
new tiempo, distancia
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_clcmd("+cachear", "cachear")
register_clcmd("-cachear", "_cachear")
register_event("Damage", "Damage", "b", "2!=0")
register_event("CurWeapon","CurWeapon","be", "1=1")
register_event("ResetHUD", "Spawn", "be")
register_dictionary("cachear.txt")
tiempo = register_cvar("amx_tiempo", "5")
distancia = register_cvar("amx_distancia", "40")
register_clcmd("say /cachear", "Instrucciones")
}
public plugin_precache()
{
precache_sound("weapons/c4_disarm.wav")
precache_sound("weapons/c4_disarmed.wav")
}
public cachear(id)
{
if(get_user_team(id) != 2)
{
ChatColor(id, "!team[JB] !yNecesitas ser policia para cachear a alguien")
return PLUGIN_HANDLED
}
if(!is_user_alive(id))
{
ChatColor(id, "!team[JB] !yNecesitas estar vivo para cachear a alguien")
return PLUGIN_HANDLED
}
get_user_aiming(id, target[id], body, get_pcvar_num(distancia))
if(!is_user_alive(target[id]))
{
ChatColor(id, "!team[JB] !yNo tienes ningun preso cerca para cachear")
return PLUGIN_HANDLED
}
if(get_user_team(target[id]) != 1)
{
ChatColor(id, "!team[JB] !yNo puedes cachear a policias")
return PLUGIN_HANDLED
}
new p_tiempo = get_pcvar_num(tiempo)
entity_set_float(id, EV_FL_maxspeed, -1.0)
set_bartime(id, p_tiempo)
w_trakcie[id] = true
emit_sound(id, CHAN_WEAPON, "weapons/c4_disarm.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
entity_set_float(target[id], EV_FL_maxspeed, -1.0)
set_bartime(target[id], p_tiempo)
w_trakcie[target[id]] = true
set_task(get_pcvar_float(tiempo), "Pokaz_bronie", TASK_ID+id)
return PLUGIN_HANDLED
}
public _cachear(id)
{
if(get_user_team(id) != 2 || !w_trakcie[id])
return PLUGIN_HANDLED
entity_set_float(id, EV_FL_maxspeed, 250.0)
set_bartime(id, 0)
w_trakcie[id] = false
remove_task(TASK_ID+id)
if(!is_user_alive(target[id]))
return PLUGIN_HANDLED
entity_set_float(target[id], EV_FL_maxspeed, 250.0)
set_bartime(target[id], 0)
w_trakcie[target[id]] = false
return PLUGIN_HANDLED
}
public Pokaz_bronie(id)
{
id -= TASK_ID
new weapons[32], numweapons
new weaponname[33]
new kastet[14]
get_user_weapons(target[id], weapons, numweapons)
format(kastet, 13, "Cuchillo")
ColorChat(id, GREEN, "[Encontraste:]")
for(new i=0; i<numweapons; i++)
{
get_weaponname(weapons[i], weaponname, 32)
replace_all(weaponname, 32, "weapon_", "")
replace_all(weaponname, 32, "knife", kastet)
ColorChat(id, GREEN, weaponname)
}
_cachear(id)
emit_sound(id, CHAN_WEAPON, "weapons/c4_disarmed.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
}
public Damage(id)
{
if(w_trakcie[id])
_cachear(id)
}
public CurWeapon(id)
{
if(w_trakcie[id])
entity_set_float(id, EV_FL_maxspeed, -1.0)
}
public Spawn(id)
{
w_trakcie[id] = false
}
public Instrucciones(id)
{
ChatColor(id, "!team[JB] !yPara cachear a alguien tienes que bindear una tecla desde la consola a: !g+cachear")
ChatColor(id, "!team[JB] !yUna vez bindeada solo tendras que ponerte delante de un preso para cachearle")
ChatColor(id, "!team[JB] !yEjemplo: !gbind v +cachear")
}
public set_bartime(id, czas)
{
message_begin(MSG_ONE, get_user_msgid("BarTime"), _, id)
write_short(czas)
message_end()
}
/** Stocks and Functions **/
// Color Chat!
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!y", "^1") // Default Color
replace_all(msg, 190, "!team", "^3") // Team Color
replace_all(msg, 190, "!team2", "^0") // Team2 Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
(Te da dinero si te toca o no te da nada) Loteria:
Código PHP:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >
#define PLUGIN " Loteria Furien SPAnet"
#define VERSION " v2.4 "
#define AUTHOR " Chikitin "
public plugin_init ( )
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent( "eRound_start", 2, "1=Round_Start" );
}
public eRound_start()
{
new iPlayers[32], iNum;
get_players( iPlayers, iNum, "a" );
for( new i; i < iNum; i++ )
{
new azar = random_num ( 0 , 170 )
switch ( azar )
{
case 1..10 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) + 1000 )
client_print ( iPlayers[i] , print_chat , "[JB] Ganaste 1000 De Dinero En La Loteria" )
}
case 11..20 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) - 1000 )
client_print ( iPlayers[i] , print_chat , "[JB] Perdiste 1000 De Dinero En La Loteria" )
}
case 21..30 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) - 500 )
client_print ( iPlayers[i] , print_chat , "[JB] Perdiste 500 De Dinero En La Loteria" )
}
case 31..40 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) + 500 )
client_print ( iPlayers[i] , print_chat , "[JB] Ganaste 500 De Dinero En La Loteria" )
}
case 41..50 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) + 5000 )
client_print ( iPlayers[i] , print_chat , "[JB] Ganaste 5000 De Dinero En La Loteria" )
}
case 51..60 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) - 5000 )
client_print ( iPlayers[i] , print_chat , "[JB] Perdiste 5000 De Dinero En La Loteria" )
}
case 61..150 :
{
client_print ( iPlayers[i] , print_chat , "[JB] No Ganaste Nada De Dinero En La Loteria" )
}
case 151..170 :
{
cs_set_user_money ( iPlayers[i] , cs_get_user_money ( iPlayers[i] ) + 3500 )
client_print ( iPlayers[i] , print_chat , "[JB] Ganaste 3500 De Dinero En La Loteria" )
}
}
return PLUGIN_HANDLED
}
}
(Sale el dia que es y el motivo ejemplo: Dia: Martes - Motivo: Meterte con los scripter de alliedmodders-es) Dia & Motivo:
Código PHP:
#include < amxmodx >
#include < cstrike >
#include < hamsandwich >
#define NUM 50 // Numero motivos
new const Motivos[ ][ ] =
{
"",
"Trafico de Drogas.",
"Violar a tu Mujer.",
"Meterte con Wulf.",
"Matar a tu Novia.",
"Maltratar a tu Mujer.",
"Violar a tu Maestra.",
"Violar a tu Perro.",
"Robar un Banco.",
"Agredir a un Policia.",
"Meterte con los scripter de alliedmodders-es.",
"Fraude a un Banco.",
"Matar a tu Hermano.",
"Falsificar Dinero.",
"Dejar a tu Madre embarazada.",
"Robar un Caramelo a un Niño.",
"Fumar en un Bar.",
"Pegarle a Zapatero.",
"Decirle Feo al Rey de España.",
"Masturbarte en una Guarderia.",
"Hacer Momios al Jefe de la policia.",
"Violar a tu Hermana.",
"Abusar de Menores.",
"Barjarte los Pantalones.",
"Matar a tu Gato.",
"No Follarte a tu Mujer.",
"No Destruir tu Instituto.",
"No pagar los Impuestos.",
"Trafico de Armas.",
"Escaparte del Manicomio.",
"Pegarle a tu Vecino.",
"Matar a 500 Personas.",
"Mentir al Jurado.",
"Matar a tu Madre.",
"Matar a tu Padre.",
"Vender Productos Caducados.",
"Envenenar a los Perros.",
"Matar a 5 Vagabundos.",
"Traficar con Organos.",
"Descuartizar a 5 Personas.",
"Traficar con los Presos.",
"Pegarle una Paliza a tu Amigo.",
"Robar en el Carrefour.",
"Robar un Donete en el Mercadona.",
"Intentar Robar un Cajero.",
"Destrozar el Coche de tu Amigo.",
"Meterle Fuego a tu ExNovia.",
"Allanamiento de Morada.",
"Vender Coches Robados.",
"Robar un Vehiculo.",
"Robarle a una Anciana."
}
new g_Dia, g_HudSync
public plugin_init( )
{
register_plugin( "Dias Jail", "1.0", "no se el autor" )
RegisterHam( Ham_Spawn, "player", "fw_PlayerSpawn", 1 )
register_logevent( "round_start", 2, "0=World triggered", "1=Round_Start" )
register_logevent( "firstround", 2, "0=World triggered", "1&Restart_Round_" )
register_logevent( "firstround", 2, "0=World triggered", "1=Game_Commencing" )
g_HudSync = CreateHudSyncObj( )
}
public fw_PlayerSpawn( id )
{
if( is_user_alive( id ) )
{
set_hudmessage( 0, 255, 0, 0.55, 0.05, 1, 6.0, 3700.0 )
switch( cs_get_user_team( id ) )
{
case CS_TEAM_T: ShowSyncHudMsg( id, g_HudSync, "[JB] Dia %d | Encarcelado Por %s", g_Dia, Motivos[ random_num( 1, NUM ) ] )
case CS_TEAM_CT: ShowSyncHudMsg( id, g_HudSync, "[JB] Hoy es Dia %d | Pulsa N para Abrir el Menu.", g_Dia )
}
}
}
public round_start( )
{
g_Dia++
}
public firstround( )
{
g_Dia = 1
}
(Menu para darle dia libre a un jugador selecionado o a todos) Menu Freeday:
Código PHP:
#include <amxmodx>
#include <cstrike>
#include <fun>
#include <hamsandwich>
public plugin_init()
{
register_plugin("JailBreak Free Menu", "1.1", "no lo se")
register_clcmd( "say /freeday","JBGlowMenu");
register_clcmd( "say_team /freeday","JBGlowMenu");
register_clcmd( "say /free","JBGlowMenu");
register_clcmd( "say_team /free","JBGlowMenu");
RegisterHam(Ham_Spawn, "player", "fw_PlayerSpawn_Post", 1)
}
public fw_PlayerSpawn_Post(id)
{
set_user_rendering(id)
}
public JBGlowMenu(id)
{
if (cs_get_user_team(id) != CS_TEAM_CT || !is_user_alive(id))
{
return PLUGIN_HANDLED;
}
new menu = menu_create("[JB]Menu Freeday:", "sub_menu");
new players[32], pnum, tempid;
new szName[32], szTempid[10];
get_players(players, pnum, "a");
for( new i; i<pnum; i++ )
{
tempid = players[i];
if (cs_get_user_team(tempid) != CS_TEAM_T)
{
continue;
}
get_user_name(tempid, szName, 31);
num_to_str(tempid, szTempid, 9);
menu_additem(menu, szName, szTempid, 0);
}
menu_display(id, menu);
return PLUGIN_HANDLED;
}
public sub_menu(id, menu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(menu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(menu, item, access, data,5, iName, 63, callback);
new tempid = str_to_num(data);
new szName[32], szName2[32];
get_user_name(id, szName, 31);
get_user_name(tempid, szName2, 31);
set_user_rendering(tempid, kRenderFxGlowShell, 255, 140, 0, kRenderNormal, 20)
set_hudmessage(0, 255, 0)
show_hudmessage(0, "[JB] %s ha dado dia libre a %s^n !", szName, szName2);
menu_destroy(menu);
return PLUGIN_HANDLED;
}
(Te sale un menu namas empezar la ronda para selecionar ARMAS) Menu armas:
Código PHP:
#include < amxmodx >
#include < amxmisc >
#include < hamsandwich >
#include < cstrike >
#include < fun >
#define PREFIX "!t[!gJailBreak!t]"
new g_MsgText
new g_PrimaryMenuId
new g_SecondaryMenuId
new g_ExtraItemsMenuId
enum _:WeaponData
{
wInfo[20],
wName[20],
wBpammo
}
enum _:ItemData
{
eInfo[30],
eCost
}
new const g_PrimaryWeapons[ ][ WeaponData ] =
{
{ "M4a1", "weapon_m4a1", 100 },
{ "Ak47", "weapon_ak47", 100 },
{ "Scout", "weapon_scout", 100 },
{ "Awp", "weapon_awp", 100 },
{ "Famas", "weapon_famas", 100 },
{ "Aug", "weapon_aug", 100 },
{ "Escopeta M3", "weapon_m3", 100 },
{ "G3sg1", "weapon_g3sg1", 100 }
}
new const g_SecondaryWeapons[ ][ WeaponData ] =
{
{ "Usp", "weapon_usp", 100 },
{ "Glock", "weapon_glock18", 100 },
{ "Deagle", "weapon_deagle", 100 },
{ "P228", "weapon_p228", 100 },
{ "FiveSeven", "weapon_fiveseven", 100 },
{ "Dual Elites", "weapon_elite", 100 }
}
new const g_ExtraItems[ ][ ItemData ] =
{
{ "125 De Vida", 3000 },
{ "150 De Vida", 5000 },
{ "125 De Vida + 100 De Chaleco", 5000 },
{ "150 De Vida + 175 De Chaleco", 7000 }
}
public plugin_init( )
{
register_plugin( "Armas JailBreak", "1.0", "rube" )
RegisterHam( Ham_Spawn, "player", "Fw_PlayerSpawnPost" , 1 )
g_PrimaryMenuId = menu_create( "\yMenu De Armas Primarias :", "primary_weapons" )
g_SecondaryMenuId = menu_create( "\yMenu De Armas Secundarias :", "secondary_weapons" )
g_ExtraItemsMenuId = menu_create( "\yMenu De Items Extras :", "extra_items" )
new pos[ 3 ], data[ 40 ], i
for ( i = 0; i < sizeof g_PrimaryWeapons; i++ )
{
num_to_str( i, pos, 2 )
menu_additem( g_PrimaryMenuId, g_PrimaryWeapons[ i ][ wInfo ], pos )
}
for ( i = 0; i < sizeof g_SecondaryWeapons; i++ )
{
num_to_str( i, pos, 2 )
menu_additem( g_SecondaryMenuId, g_SecondaryWeapons[ i ][ wInfo ], pos )
}
for ( i = 0; i < sizeof g_ExtraItems; i++ )
{
num_to_str( i, pos, 2 )
formatex( data, 49, "%s \y[%d$]", g_ExtraItems[ i ][ eInfo ], g_ExtraItems[ i ][ eCost ] )
menu_additem( g_ExtraItemsMenuId, data, pos )
}
g_MsgText = get_user_msgid( "SayText" )
}
public Fw_PlayerSpawnPost( id )
{
if (is_user_alive( id ) && cs_get_user_team( id ) == CS_TEAM_CT )
menu_display( id , g_SecondaryMenuId , 0 )
}
public secondary_weapons( id, menu, item )
{
if ( item == MENU_EXIT )
return PLUGIN_HANDLED
strip_user_weapons( id )
give_item( id , g_SecondaryWeapons[ item ][ wName ] )
cs_set_user_bpammo( id, get_weaponid( g_SecondaryWeapons[ item ][ wName ] ), g_SecondaryWeapons[ item ][ wBpammo ] )
ChatColor( id , "%s !nRecibistes Una !g%s" , PREFIX, g_SecondaryWeapons[ item ][ wInfo ] )
menu_display( id , g_PrimaryMenuId , 0 )
return PLUGIN_HANDLED
}
public primary_weapons( id, menu, item )
{
if ( item == MENU_EXIT )
return PLUGIN_HANDLED
give_item( id , g_PrimaryWeapons[ item ][ wName ] )
cs_set_user_bpammo( id, get_weaponid( g_PrimaryWeapons[ item ][ wName ] ), g_PrimaryWeapons[ item ][ wBpammo ] )
ChatColor( id , "%s !nRecibistes Una !g%s" , PREFIX, g_PrimaryWeapons[ item ][ wInfo ] )
menu_display( id , g_ExtraItemsMenuId , 0 )
return PLUGIN_HANDLED
}
public extra_items( id, menu, item )
{
if ( item == MENU_EXIT )
return PLUGIN_HANDLED
new money = cs_get_user_money( id ) - g_ExtraItems[ item ][ eCost ]
if ( money < 0 )
{
ChatColor( id , "%s !nLo Sentimos , No Tienes !gSuficiente Dinero" , PREFIX )
return PLUGIN_HANDLED
}
switch( item )
{
case 0: set_user_health( id , 125 )
case 1: set_user_health( id , 150 )
case 2:
{
set_user_armor( id , 100 )
set_user_health( id , 125 )
}
case 3:
{
set_user_armor ( id , 175 )
set_user_health ( id , 150 )
}
}
cs_set_user_money( id, money )
ChatColor( id , "%s !nComprastes !g%s !npor %d$" , PREFIX, g_ExtraItems[ item ][ eInfo ], g_ExtraItems[ item ][ eCost ] )
return PLUGIN_HANDLED
}
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)
replace_all(msg, 190, "!g", "^4") // Green Color
replace_all(msg, 190, "!n", "^1") // Default Color
replace_all(msg, 190, "!t", "^3") // Team Color
if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, g_MsgText, _, players[i])
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}
Post cojido de ExTrEmOdUrO.
Sé humilde en tu enfoque.