Jump to content

Cerere plugin - REZOLVAT


Antonioo321

Recommended Posts

Nume : VIP


Versiune : una buna


Descriere detaliata : As vrea si eu un plguin de vip 


sa aiba acces  flagul "t" si sa beneficieze de 2 x jump,150hp la fiecare spawn,damage marit cu 10% inclusiv grenada,Silent walk.


  • Like 1
Link to comment
Share on other sites

Am eu un plugin, insa nu contine flaguri, ci ti se creeaza un viplist.ini unde adaugi nickname-urile fiecarui jucator, si dupa ce schimbi mapa automat jucatorii a caror nickname-uri le-ai adaugat in acel .txt vor beneficia de ceea ce doresti tu . 

In cazul in care esti interesat, te astept cu un reply, fiindca nu vreau sa postez doar asa, fara sa stiu daca intradevar doresti sa te folosesti de el. Insa vreau sa spun ca e mult mai usor de utilizat decat cel cu flag-urile, si altele . 

  • Like 3
Link to comment
Share on other sites

 

#include amxmodx
#include amxmisc
#include fakemeta
#include engine
#include hamsandwitch
 
new jumpznum[33] = 0, bool:dozjump[33] = false, cvar_jumps
new g_iMaxPlayers
 
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )
#pragma semicolon 1
 
new const g_FILENAME[] = "VIP.cfg"
 
public plugin_init()
{
g_iMaxPlayers = get_maxplayers ( )
cvar_jumps = register_cvar("amx_jumps", "2")
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
register_logevent( "RoundStart", 2, "1=Round_Start" )
}
 
public RoundStart( iPlayer )
{
if ( is_user_alive( iPlayer ) )
{
cs_set_user_healt(iPlayer, 150)
}
}
 
public client_putinserver(id)
{
jumpznum[id] = 0
dozjump[id] = false
}
 
public client_disconnect(id)
{
jumpznum[id] = 0
dozjump[id] = false
}
 
public client_PreThink(id)
{
if(!is_user_alive(id) return PLUGIN_CONTINUE
 
new nzbut = get_user_button(id)
new ozbut = get_user_oldbutton(id)
if((nzbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut & IN_JUMP))
{
if (jumpznum[id] < get_pcvar_num(cvar_jumps))
{
dozjump[id] = true
jumpznum[id]++
return PLUGIN_CONTINUE
}
}
if((nzbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpznum[id] = 0
return PLUGIN_CONTINUE
} 
return PLUGIN_CONTINUE
}
 
public client_PostThink(id)
{
if(!is_user_alive(id) return PLUGIN_CONTINUE
 
if(dozjump[id] == true)
{
new Float:vezlocityz[3] 
entity_get_vector(id,EV_VEC_velocity,vezlocityz)
vezlocityz[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,vezlocityz)
dozjump[id] = false
return PLUGIN_CONTINUE
} 
return PLUGIN_CONTINUE
} 
 
public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage ) {
 
if ( iInflictor == iAttacker && IsPlayer ( iAttacker ) ) {
 
SetHamParamFloat ( 4, fDamage * 2.0 );
return HAM_HANDLED;
 
}
 
return HAM_IGNORED;
 
}
 
public plugin_cfg()
{
new ConfigsDir[64]
get_configsdir(ConfigsDir, sizeof ConfigsDir -1)
server_cmd("exec %s/%s", ConfigsDir, g_FILENAME)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/
Edited by dK^aL3X
Link to comment
Share on other sites

#include amxmodx
#include amxmisc
#include fakemeta
#include engine
#include hamsandwitch
 
new jumpznum[33] = 0, bool:dozjump[33] = false, cvar_jumps
new g_iMaxPlayers
 
#define IsPlayer(%0)    ( 1 <= %0 <= g_iMaxPlayers )
#pragma semicolon 1
 
new const g_FILENAME[] = "VIP.cfg"
 
public plugin_init()
{
g_iMaxPlayers = get_maxplayers ( )
cvar_jumps = register_cvar("amx_jumps", "2")
RegisterHam ( Ham_TakeDamage, "player", "Player_TakeDamage" );
register_logevent( "RoundStart", 2, "1=Round_Start" )
}
 
public RoundStart( iPlayer )
{
if ( is_user_alive( iPlayer ) )
{
cs_set_user_healt(iPlayer, 150)
}
}
 
public client_putinserver(id)
{
jumpznum[id] = 0
dozjump[id] = false
}
 
public client_disconnect(id)
{
jumpznum[id] = 0
dozjump[id] = false
}
 
public client_PreThink(id)
{
if(!is_user_alive(id) return PLUGIN_CONTINUE
 
new nzbut = get_user_button(id)
new ozbut = get_user_oldbutton(id)
if((nzbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(ozbut & IN_JUMP))
{
if (jumpznum[id] < get_pcvar_num(cvar_jumps))
{
dozjump[id] = true
jumpznum[id]++
return PLUGIN_CONTINUE
}
}
if((nzbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpznum[id] = 0
return PLUGIN_CONTINUE
} 
return PLUGIN_CONTINUE
}
 
public client_PostThink(id)
{
if(!is_user_alive(id) return PLUGIN_CONTINUE
 
if(dozjump[id] == true)
{
new Float:vezlocityz[3] 
entity_get_vector(id,EV_VEC_velocity,vezlocityz)
vezlocityz[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,vezlocityz)
dozjump[id] = false
return PLUGIN_CONTINUE
} 
return PLUGIN_CONTINUE
} 
 
public Player_TakeDamage ( iVictim, iInflictor, iAttacker, Float:fDamage ) {
 
if ( iInflictor == iAttacker && IsPlayer ( iAttacker ) ) {
 
SetHamParamFloat ( 4, fDamage * 2.0 );
return HAM_HANDLED;
 
}
 
return HAM_IGNORED;
 
}
 
public plugin_cfg()
{
new ConfigsDir[64]
get_configsdir(ConfigsDir, sizeof ConfigsDir -1)
server_cmd("exec %s/%s", ConfigsDir, g_FILENAME)
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ ansicpg1252\\ deff0\\ deflang1033{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ f0\\ fs16 \n\\ par }
*/

nu merge compilat  imi zice : VIP.sma(5) : fatal error 100: cannot read from file: "handswitch"

Link to comment
Share on other sites

Iti dau plugin-ul de VIP care ruleaza in acest moment la mine pe server, eu zic ca e destul de avantajos, insa nu contine silent walk, si cred ca si viata la fiecare spawn, insa iti poti edita chiar tu la configs . 

 

 

Aici ai pluginul : CLICK

Aici ai sursa : CLICK

Adaugi in plugins.ini urmatoarea linie  : VIP.amxx

 

Pluginul VIP ti se va activa atunci cand vei schimba harta . 

Dupa ce vei schimba harta, intri in ftp, si va trebuii sa-ti apara un folder numit : VIP care contine : vip-configs.cfg si vips_list.ini . In vip-configs.cfg iti setezi tu iar la vips_list pui doar nickname-ul celor care vrei tu sa aiba VIP . Vip-ul acelor persoane, se va activa mereu dupa schimbarea hartii . 

 

Trebuie sa-ti arate exact asa atunci cand ai schimbat harta : 

Screenshot_1.jpg

 

Si dupa, intri in folderul VIP si vei avea cele doua enumerate de catre mine mai sus : 

 

Screenshot_2.jpg

 

Succes. Daca nu-ti merge ceva, cauta-ma . Sper sa-ti placa si sa-ti fie de ajutor 

  • Like 2
Link to comment
Share on other sites

Uite aici si V2 cea cu modificarea damage-ului la cei care au VIP . 

 

Aici ai sursa : CLICK

Aici ai pluginul : CLICK

 

Tot cum ti-am explicat si mai sus, vei avea acel folder insa la vip-config.cfg iti va aparea un mic cvar la urma, acela fiind : 

 vip_damage "2"

Cifra 2 inseamna ca damage-ul este marit de 2x la cei care au VIP. Il modifici in functie cu cat vrei tu sa fie marit damage-ul, insa spun ca ar fi oke sa-l lasi asa, la cifra 2, fiindca s-ar putea sa-ti pierzi din playeri .

 

O zi buna .

  • Like 2
Link to comment
Share on other sites

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