Jump to content

Cerere modificare plugin


Rzw^Mk5

Recommended Posts

Am eu un plugin de VIP , dar are in meniu doar M4A1+DEAGLE / AK47+DEAGLE / Grenade ... il pot modifica la valori de HP per kiilll per Hs si la Bani per kill per hs ... , daca vrei contacteaza-ma pe privat , in schimbul a 2 euro ofer pluginul , pluginul vine doar in varianta .amxx nu si .sma :)

Link to comment
Share on other sites

Am eu un plugin de VIP , dar are in meniu doar M4A1+DEAGLE / AK47+DEAGLE / Grenade ... il pot modifica la valori de HP per kiilll per Hs si la Bani per kill per hs ... , daca vrei contacteaza-ma pe privat , in schimbul a 2 euro ofer pluginul , pluginul vine doar in varianta .amxx nu si .sma :)

 

Numai fa marketing aici ca vei primi warn

 

#1 icon_share.png

 
 
 
 
 
O sa editez eu pluginu ai rabdare :)
 
 
---------------------------update------------------
 

 

 

Netestat !

/* PLUGIN CREAT DE ZeniX aka lucy 
REALIZAT IN TOTALITATE + CVAR 2013
V 0.1


// CVAR


bullets_gold "0" // CVAR sa apara linile golden cand tragi  1- ON / 2- OFF


bonus_status "1" // CVAR sa fie activat Pluginul BONUS 1- ON /0 - OFF
bonus_maxhealth "255" // CVAR MAXIMUM de bonus cat sa aibe un player default 255 


bonus_knife "0" // CVAR BONUS kill cutit kill 0 dezactivat / default 10
bonus_knifeheadshot "20"  // CVAR BONUS kill cutit kill/headshot 0 dezactivat / default 20
bonus_kill "25" // BOnus kill
bonus_hs", "55") // Bonus kill HS 


*/
#include <amxmodx>
#include <fun>
#include <amxmisc>
#include <cstrike>
#include <colorchat>
#include <hamsandwich>
#include <fakemeta_util>




#define PLUGIN "Classic VIP"
#define VERSIUNE "0.1"


#define CLASSIC_VIP ADMIN_LEVEL_H


static const COLORG[] = "^x04"
static const COLORD[] = "^x01"
static const COLORT[] = "^x03"


/*
new v_Ak47_Gold [ ] = "models/v_golden_ak47.mdl"
new p_Ak47_Gold [ ] = "models/p_golden_ak47.mdl"


new v_M4a1_Gold [ ] = "models/v_golden_m4a1_UP.mdl"
new p_M4a1_Gold [ ] = "models/p_golden_m4a1_UP.mdl"


new v_Golden_Deagle [ ] = "models/v_golden_deagle.mdl"
new p_Golden_Deagle [ ] = "models/p_golden_deagle.mdl"
*/


new b_Status, b_MaxHealth, b_Kill, b_Knife, b_Headshot, b_KnifeHeadshot
new bullets[ 33 ], m_spriteTexture
new cvar_goldbullets
new maxplayers, gmsgSayText
//, g_msgSayText


new ViewModels [ ] [ ] = {


"models/v_golden_m4a1.mdl",
"models/v_golden_ak47.mdl",
"models/v_golden_deagle.mdl"
}


new PlayersModels [ ] [ ] = {


"models/p_golden_m4a1.mdl", 
"models/p_golden_ak47.mdl",
"models/p_golden_deagle.mdl"
}


public plugin_init ( ) {


register_plugin ( PLUGIN, VERSIUNE, "zenix aka lucylucy" );


register_clcmd ( "say /arme", "ApperNext", CLASSIC_VIP );
register_clcmd ( "say_team /arme", "ApperNext", -1 );
register_clcmd("say /vreauvip", "ShowMotd");


register_event( "CurWeapon", "bullets_gold", "be", "1=1", "3>0");
register_event ( "CurWeapon", "CurrentWeapon", "be", "1=1" );
register_event( "DeathMsg", "EventKillBonus", "a", "1>0" );


RegisterHam ( Ham_Spawn, "player", "ApperNext", 1 );
RegisterHam ( Ham_Spawn, "player", "Player_Spawn", 1);
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );


maxplayers = get_maxplayers()
gmsgSayText = get_user_msgid("SayText")
register_clcmd("say", "handle_say")


register_logevent("round_start", 2, "1=Round_Start")


// CVAR-uri .. La Greu  ZeNiX 
cvar_goldbullets = register_cvar("bullets_gold", "0"); // CVAR sa apara linile gol cand tragi  1- ON / 2- OFF


b_Status = register_cvar("bonus_status", "1"); // CVAR sa fie activat Pluginul BONUS 1- ON /0 - OFF
b_MaxHealth = register_cvar("bonus_maxhealth", "130"); // CVAR MAXIMUM de bonus cat sa aibe un player default 255 


b_Knife = register_cvar("bonus_knife", "0"); // CVAR BONUS kill cutit kill 0 dezactivat / default 10
b_KnifeHeadshot = register_cvar("bonus_knifeheadshot", "20"); // CVAR BONUS kill cutit kill/headshot 0 dezactivat / default 20
b_Kill = register_cvar("bonus_kill", "25"); // BOnus kill
b_Headshot = register_cvar("bonus_hs", "55"); // Bonus kill HS




}


public plugin_precache ( ) {
/*
precache_model ( v_Ak47_Gold )
precache_model ( p_Ak47_Gold )


precache_model ( v_M4a1_Gold )
precache_model ( p_M4a1_Gold )


precache_model ( v_Golden_Deagle )
precache_model ( p_Golden_Deagle )
*/
new lucy;
for ( lucy = 0; lucy < sizeof ( ViewModels ); lucy++ )
engfunc ( EngFunc_PrecacheModel, ViewModels [ lucy ] );
new zenix;
for ( zenix = 0; zenix < sizeof ( PlayersModels ); zenix++ )
engfunc ( EngFunc_PrecacheModel, PlayersModels [ zenix ] ); 


m_spriteTexture = precache_model("sprites/dot.spr") 
}




public Player_Spawn(id) 
{ 
    new iPlayers [ 32 ], iNum, i;
get_players ( iPlayers, iNum );


for ( i = 0; i < iNum; i++ )
{
if( !is_user_alive ( iPlayers [ i ] ) )
continue;


if(get_user_flags(id) & CLASSIC_VIP) {


fm_strip_user_weapons ( iPlayers [ i ] );
set_pdata_int ( iPlayers [ i ], 116, 0 );
give_item(id, "weapon_deagle") 
give_item(id, "weapon_knife") 
fm_give_item(id, "weapon_hegrenade") 
                fm_give_item(id, "weapon_hegrenade")             
                give_item(id, "weapon_flashbang")  
                give_item(id, "weapon_flashbang") 
give_item(id, "weapon_smokegrenade") 
}
}
}


/*
 if(is_user_alive(id)) 
    { 
        new CsTeams:team = cs_get_user_team(id)
        switch(team) 
        { 
            case 0: 
            { 
                strip_user_weapons(id) 
                give_item(id, "weapon_knife") 
give_item(id, "weapon_hegrenade")
                give_item(id, "weapon_hegrenade")               
                give_item(id, "weapon_flashbang") 
                give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
            } 


}


    }
*/


public ApperNext ( id ) {


if ( get_user_team ( id ) == 1 && get_user_flags(id) & CLASSIC_VIP ) {


set_task( 0.1, "ArmeVip", id );
}


if ( get_user_team ( id ) == 2 && get_user_flags(id) & CLASSIC_VIP ) {


set_task( 0.1, "ArmeVip", id );
}


}


public ArmeVip ( id, level, cid ) {


new menu = menu_create ( "\rARME \yVIP", "ArmeVipGiver" );


menu_additem ( menu, "\wM4A1 + Deagle \yGOLDEN \r X2 DMG", "1", 0);
menu_additem ( menu, "\wAK47 + Deagle \yGOLDEN \r X2 DMG", "2", 0);
menu_additem ( menu, "\w30 \yHP", "3", 0);


menu_setprop ( menu, MPROP_EXIT, MEXIT_ALL );
menu_display ( id, menu, 0 );




return 1;
}


public ArmeVipGiver ( id, menu, item ) {


if( item == MENU_EXIT )
{
return 1;
}


new data [ 6 ], szName [ 64 ];
new access, callback;
menu_item_getinfo ( menu, item, access, data,charsmax ( data ), szName,charsmax ( szName ), callback );
new key = str_to_num ( data );


switch(key)
{
case 1:
{
fm_give_item(id, "weapon_m4a1");
fm_give_item(id, "weapon_deagle"); 
cs_set_user_bpammo(id, CSW_M4A1, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35)
ColorChat ( id, TEAM_COLOR, "Ai Primit M4A1 + Deagle Golden !");
}
case 2:
{
fm_give_item(id, "weapon_ak47");
fm_give_item(id, "weapon_deagle"); 
cs_set_user_bpammo(id, CSW_AK47, 90);
cs_set_user_bpammo(id, CSW_DEAGLE, 35); 


ColorChat ( id, TEAM_COLOR, "Ai Primit AK47 + Deagle Golden !"); 


}
case 3:
{
set_user_health( id, 30 );


ColorChat ( id, TEAM_COLOR, "Tocmai ai primit 30 HP !");


}
}
return 1;
}


public CurrentWeapon ( id ) {


new szWeapon = get_user_weapon ( id ) ;
if ( szWeapon == CSW_M4A1 && get_user_flags( id ) & CLASSIC_VIP ) {




set_pev ( id, pev_viewmodel2, ViewModels [ 0 ] );
set_pev ( id, pev_weaponmodel2, PlayersModels [ 0 ] );


}


if ( szWeapon == CSW_AK47 && get_user_flags( id ) & CLASSIC_VIP) {


set_pev ( id, pev_viewmodel2, ViewModels [ 1 ] );
set_pev ( id, pev_weaponmodel2, PlayersModels [ 1 ] );


}


if ( szWeapon == CSW_DEAGLE && get_user_flags( id ) & CLASSIC_VIP) {


set_pev ( id, pev_viewmodel2, ViewModels [ 2 ] );
set_pev ( id, pev_weaponmodel2, PlayersModels [ 2 ] );


}


return 1;
}


public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits ) {


    if ( get_user_weapon ( iAttacker ) == CSW_M4A1 && get_user_flags( iAttacker ) & CLASSIC_VIP   ) {
        
        SetHamParamFloat( 4, fDamage * 2.0);
        return HAM_HANDLED;
        
    }
   
    if (  get_user_weapon ( iAttacker ) == CSW_AK47 && get_user_flags( iAttacker ) & CLASSIC_VIP ) {
        
        SetHamParamFloat( 4, fDamage * 2.0);
        return HAM_HANDLED;
        
    }


    if ( get_user_weapon ( iAttacker ) == CSW_DEAGLE && get_user_flags( iAttacker ) & CLASSIC_VIP ) {
        
        SetHamParamFloat( 4, fDamage * 2.0);
        return HAM_HANDLED;
        
    }
    
    return HAM_IGNORED;
    
}




public ShowMotd(id) {
        new iCfgDir[32], iFile[192];
        
        get_configsdir(iCfgDir, charsmax(iCfgDir));
        formatex(iFile, charsmax(iFile), "%s/vip.html", iCfgDir);


        show_motd(id, iFile);
}
/*
public client_authorized ( id ) {


set_task(30.0, "PrintChat" ,id)


}


public PrintChat ( id ) {


//client_print(id, print_chat, "\r[VIP] \wScrie in chat \r/vreauvip \wpentru Beneficile VIP.")
ColorChat ( id, GREEN, "Scrie in chat /vreauvip pentru Beneficiile VIP !");


}
*/


public bullets_gold(id)
{
if (get_pcvar_num(cvar_goldbullets) && get_user_flags( id ) & CLASSIC_VIP )
{
new clip,ammo
new wpnid = get_user_weapon(id,clip,ammo)
new pteam[16]


get_user_team(id, pteam, 15)


if ((bullets[id] > clip) && (wpnid == CSW_AK47, CSW_M4A1, CSW_DEAGLE && get_user_flags( id ) & CLASSIC_VIP) ) 
{
new vec1[3], vec2[3]
get_user_origin(id, vec1, 1) // origin; your camera point.
get_user_origin(id, vec2, 4) // termina; where your bullet goes (4 is cs-only)




//BEAMENTPOINTS
message_begin( MSG_BROADCAST,SVC_TEMPENTITY)
write_byte (0)     //TE_BEAMENTPOINTS 0
write_coord(vec1[0])
write_coord(vec1[1])
write_coord(vec1[2])
write_coord(vec2[0])
write_coord(vec2[1])
write_coord(vec2[2])
write_short( m_spriteTexture )
write_byte(1) // framestart
write_byte(5) // framerate
write_byte(2) // life
write_byte(10) // width
write_byte(0) // noise
write_byte( 255 )     // r, g, b
write_byte( 215 )       // r, g, b
write_byte( 0 )       // r, g, b
write_byte(200) // brightness
write_byte(150) // speed
message_end()
}


bullets[id] = clip
}


}


/*
    new killer = read_data(1);
    new victim = read_data(2);
    new headshot = read_data(3);
*/


public EventKillBonus() {
    new killer
    new victim
    new headshot
    new weapon = get_user_weapon(killer);
    new num;
    
    if(killer == victim || !get_pcvar_num(b_Status) || !is_user_connected(victim) || !is_user_alive(killer) && get_user_flags( killer ) && CLASSIC_VIP)
        return PLUGIN_HANDLED;
    
    if(headshot && weapon == CSW_KNIFE ) {
        num = get_pcvar_num(b_KnifeHeadshot)
        GiveHealth(killer, num)
        HudMessage(killer, "Ai primit +%ihp", num)
    } else if(headshot) {
        num = get_pcvar_num(b_Headshot)
        GiveHealth(killer, num)
        HudMessage(killer, "Ai primit +%ihp pentru HS", num)
    } else if(weapon == CSW_KNIFE) {
        num = get_pcvar_num(b_Knife)
        GiveHealth(killer, num)
        HudMessage(killer, "Ai primit +%ihp", num)
    } else {
        num = get_pcvar_num(b_Kill)
        GiveHealth(killer, num)
        HudMessage(killer, "Ai primit +%ihp pentru Kill", num)
    }
    return PLUGIN_CONTINUE;
}


GiveHealth(id, count)
    set_user_health(id, min( (get_user_health(id) + count), get_pcvar_num(b_MaxHealth) ))


stock HudMessage(const id, const input[], any:...) {
    static msg[191];
    vformat(msg, 190, input, 3);
    
    set_hudmessage(255, 255, 0, 0.27, 0.14, 0, 5.0, 5.0, 0.0, 0.0, -1);
    show_hudmessage(id, "%s^n%s", msg)
}
/*
stock client_printcolor(id, const message[], any:...)
{
static buffer[512], argscount
argscount = numargs()


if (!id) {


static players[32], num, player, i, i2
get_players(players, num , "ch")


for (i = 0; i < num; i++) {


player = players[i]


static changed[5], changedcount
changedcount = 0


for (i2 = 2; i2 < argscount; i2++)
{
if (getarg(i2) == LANG_PLAYER)
{
setarg(i2, 0, player)
changed[changedcount] = i2
changedcount++
}
}


vformat(buffer, charsmax(buffer), message, 3)


replace_all(buffer, charsmax(buffer), "/g", "^4")
replace_all(buffer, charsmax(buffer), "/y", "^1")


message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, player)
write_byte(player)
write_string(buffer)
message_end()


for (i2 = 0; i2 < changedcount; i2++)
setarg(changed[i2], 0, LANG_PLAYER)
}
}
else {


vformat(buffer, charsmax(buffer), message, 3)


replace_all(buffer, charsmax(buffer), "/g", "^4")
replace_all(buffer, charsmax(buffer), "/y", "^1")


message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, id)
write_byte(id)
write_string(buffer)
message_end()
}
}
*/
public handle_say(id) {
new said[192]
read_args(said,192)
if( ( containi(said, "vips") != -1 && containi(said, "vips") != -1 ) || contain(said, "/vips") != -1 )
set_task(0.1,"print_viplist",id)
return PLUGIN_CONTINUE
}


public print_viplist(user) 
{
new adminnames[33][32]
new message[256]
new id, count, x, len


for(id = 1 ; id <= maxplayers ; id++)
if(is_user_connected(id))
if(get_user_flags(id) & CLASSIC_VIP)
get_user_name(id, adminnames[count++], 31)


len = format(message, 255, "%s VIPI ONLINE: ",COLORG)
if(count > 0) {
for(x = 0 ; x < count ; x++) {
len += format(message[len], 255-len, "^x03%s%s ", adminnames[x], x < (count-1) ? ", ":"", COLORT)
if(len > 96 ) {
print_message(user, message)
len = format(message, 255, "%s ",COLORG)
}
}
print_message(user, message)
}
else {
len += format(message[len], 255-len, "^x01Nu sunt VIPI online.", COLORD)
print_message(user, message)
}


}


print_message(id, msg[]) {
message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
write_byte(id)
write_string(msg)
message_end()
}


/*';';';';';';';'';';';';';';';'';';';';';';';'';';';';';';';'
;' Plugin     ;'
;'     ;'
;' By 23:16 AM     ;'
;'   2.07.2013 FINISH..    ;'
;' ZeniX aka lucy     ;'
';';';';';';';'';';';';';';';'';';';';';';';'';';';';';';';';'
*/
Edited by Don Liviu
update
  • Like 1
Link to comment
Share on other sites

Nu este bun , eroare la compilare.. :(

Are multe erori...

VIP.sma(1) : error 010: invalid function or declaration
VIP.sma(9) : error 010: invalid function or declaration
VIP.sma(12) : error 010: invalid function or declaration
VIP.sma(16) : error 010: invalid function or declaration
VIP.sma(22) : error 010: invalid function or declaration
VIP.sma(163) : warning 217: loose indentation
VIP.sma(180) : warning 217: loose indentation
VIP.sma(183) : warning 217: loose indentation
VIP.sma(278) : error 017: undefined symbol "TEAM_COLOR"
VIP.sma(278) : warning 215: expression has no effect
VIP.sma(278) : error 001: expected token: ";", but found ")"
VIP.sma(278) : error 029: invalid expression, assumed zero
VIP.sma(278) : fatal error 107: too many error messages on one line

Link to comment
Share on other sites

@Don Liviu: Tu ai fost mai bun, eu sunt mai rau si sanctionez.

 

Cel care a cerut bani, de data asta scapi cu WARN, data viitoare te scap de tot.

  • Like 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...