DeathRun.Extreme
Bun Venit PE Forum
Va Rugam Inregistreazate
Multumin Pentru Inregistrare
DeathRun.Extreme
Bun Venit PE Forum
Va Rugam Inregistreazate
Multumin Pentru Inregistrare
DeathRun.Extreme
Doriți să reacționați la acest mesaj? Creați un cont în câteva clickuri sau conectați-vă pentru a continua.


DeathRun.Extreme
 
AcasaPortal*Ultimele imaginiÎnregistrareConectare

 

 MapZone2

In jos 
AutorMesaj
Dj.UzZy
Administrator
Administrator
Dj.UzZy


Numarul mesajelor : 442
Data de inscriere : 19/05/2009

MapZone2 Empty
MesajSubiect: MapZone2   MapZone2 I_icon_minitimeLun Aug 03, 2009 2:03 pm

Descriere: Acest plugin afiseaza un mesaj in functie de zona in care va aflati (Bombtarget, Buyzone, etc.. )

Nume: MapZone Info
Versiune: 1.0
Code:
#include
#include

#define PLUGIN "MapZone Info"
#define VERSION "1.0"
#define AUTHOR "anakin_cstrike"

#if cellbits == 32
#define OFFSET_MAPZONE 235
#else
#define OFFSET_MAPZONE 268
#endif

#define FM_MAPZONE_BUY (1<<0)
#define FM_MAPZONE_BOMBTARGET (1<<1)
#define FM_MAPZONE_HOSTAGE_RESCUE (1<<2)
#define FM_MAPZONE_ESCAPE (1<<3)
#define FM_MAPZONE_VIP_SAFETY (1<<4)


enum
{
MAPZONE_BUY,
MAPZONE_BOMBTARGET,
MAPZONE_HOSTAGERESCUE,
MAPZONE_ESCAPE,
MAPZONE_VIPSAFETY,

MAPZONE_NONE
};

new const g_Messages[ MAPZONE_NONE ][ ] =
{
"Buyzone",
"BombTarget",
"HostageRescue",
"Escape",
"VipSafety"
};

new g_MapZone[ 33 ][ MAPZONE_NONE ];
new g_msgsaytext;

public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR );
register_forward( FM_PlayerPreThink, "fw_prethink" );
register_event( "ResetHUD", "reset_hud", "b" );

g_msgsaytext = get_user_msgid( "SayText" );
}

public fw_prethink( id )
{
if( !is_user_alive( id ) )
return FMRES_IGNORED;

static mapzone;
mapzone = fm_get_user_mapzone( id );

if( g_MapZone[ id ][ mapzone ] )
return FMRES_IGNORED;

g_MapZone[ id ][ mapzone ] = true;
Message( id, g_Messages[ mapzone ] );

return FMRES_IGNORED;
}

public reset_hud( id )
{
for( new i; i < 5; i++ )
g_MapZone[ id ][ i ] = 0;
}

fm_get_user_mapzone( index )
{
new zone;

if( get_pdata_int( index, OFFSET_MAPZONE ) & FM_MAPZONE_BUY )
zone = MAPZONE_BUY;
else if( get_pdata_int( index, OFFSET_MAPZONE ) & FM_MAPZONE_BOMBTARGET )
zone = MAPZONE_BOMBTARGET;
else if( get_pdata_int( index, OFFSET_MAPZONE ) & MAPZONE_HOSTAGERESCUE )
zone = MAPZONE_HOSTAGERESCUE;
else if( get_pdata_int( index, OFFSET_MAPZONE ) & FM_MAPZONE_ESCAPE )
zone = MAPZONE_ESCAPE;
else if( get_pdata_int( index, OFFSET_MAPZONE ) & FM_MAPZONE_VIP_SAFETY )
zone = MAPZONE_VIPSAFETY;

return zone;
}

Message( index, const text[ ], { Float, Sql, Result, _ }:... )
{
new Buffer[ 128 ], Buffer2[ 128 ];
formatex( Buffer2, sizeof Buffer2 - 1, "Esti in zona ^x04 %s", text );
vformat( Buffer, sizeof Buffer - 1, Buffer2, 3 );

message_begin( MSG_ONE, g_msgsaytext, _, index );
write_byte( index );
write_string( Buffer );
message_end();
}



Instalare:
1. Fisierul mapzone_info.sma il puneti in addons/amxmodx/scripting
2. Fisierul mapzone_info.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:

Code:
Cod:
mapzone_info.amxx
Sus In jos
https://extreme-deathrun.forumgratuit.ro
 
MapZone2
Sus 
Pagina 1 din 1

Permisiunile acestui forum:Nu puteti raspunde la subiectele acestui forum
DeathRun.Extreme :: Download :: Plugin-uri-
Mergi direct la: