vipmenu

Vaata eelmist teemat Vaata järgmist teemat Go down

avatar
Pulber
Komeet
Postitusi : 186
Maine : 18
Liitus : 13/11/2012
Vaata kasutaja profiili

PostitaminePulber on 10.05.15 22:26

Hey kas keegi tahab teha vipmenu awp only serveri jauks  
Mis võiks olla vipmenus

1.Kuulid ei sa otsa awp
2.Elud 125hp ja armor
3.Kaks hüpet
4.bunny hop

Vipmenud saad kasutada iga raund ainult korra


[b]EstGaming.eu De_Dust2 Only::. (217.146.72.163:27017)
EstGaming.eu Surf_Ski_2 Only::. (217.146.72.163:27018)
avatar
Tonight


Postitusi : 14636
Maine : 2652
Liitus : 19/02/2012
Staatus : @Faval
Vaata kasutaja profiili

PostitamineTonight on 14.05.15 22:44

Testimata:
Kood:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fun>
#include <hamsandwich>

#define PLUGIN "AWP VIPMenu"
#define VERSION "1.0.0"
#define AUTHOR "Faval"

new bool:Unlimited[33]
new Bunnyhop[33], JumpCountv2[33], CvarMultiJump, Multijump[33], g_maxplayers

public plugin_init() {
 register_plugin(PLUGIN, VERSION, AUTHOR)
 
 register_event("HLTV", "Event_NewRound", "a", "1=0", "2=0");
 
 g_maxplayers = get_maxplayers()
 CvarMultiJump = register_cvar("multijump_amount", "1")
 register_event("CurWeapon", "RelvaEvent", "be", "1=1")
 RegisterHam(Ham_Player_Jump, "player", "_FW_Player_Jump", 0)
 RegisterHam(Ham_Spawn, "player", "CmdVip", 1)
 RegisterHam(Ham_TakeDamage, "player", "SaiDamage")
}

public client_putinserver(id)
{
 Bunnyhop[id] = false
 Multijump[id] = false
 Unlimited[id] = false
}

public Event_NewRound()
{
 for (new id = 1; id <= g_maxplayers; id++)
 {
 Bunnyhop[id] = false
 Multijump[id] = false
 Unlimited[id] = false
 }
}  

public CmdVip(id) {
 if (get_user_flags(id) & ADMIN_LEVEL_H) {
 new menu = menu_create("AWP VIPMenüü:", "vip_handler")
 menu_additem(menu, "Unlimited Ammo", "1", 0)
 menu_additem(menu, "Elud ja Armor (125)", "2", 0)
 menu_additem(menu, "Kaks hüpet", "3", 0)
 menu_additem(menu, "Bunnyhop", "4", 0)
 menu_setprop(menu, MPROP_EXIT, MEXIT_ALL)
 menu_setprop(menu, MPROP_EXITNAME, "Välju")
 menu_display(id, menu, 0)
 }
}

public vip_handler(id, menu, item) {
 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:
 {
 Unlimited[id] = true
 }

 case 2:
 {
 set_user_health(id, 125)
 set_user_armor(id, 125)
 }

 case 3:
 {
 Multijump[id] = true
 }

 case 4:
 {
 Bunnyhop[id] = true
 }
 }
 menu_destroy(menu);
 return PLUGIN_HANDLED
}

public client_PreThink(id)
{
 if (!Bunnyhop[id])
 return PLUGIN_CONTINUE
 
 entity_set_float(id, EV_FL_fuser2, 0.0)        
 
 if (entity_get_int(id, EV_INT_button) & 2) {
 new flags = entity_get_int(id, EV_INT_flags)
 
 if (flags & FL_WATERJUMP)
 return PLUGIN_CONTINUE
 if (entity_get_int(id, EV_INT_waterlevel) >= 2)
 return PLUGIN_CONTINUE
 if (!(flags & FL_ONGROUND))
 return PLUGIN_CONTINUE
 
 new Float:velocity[3]
 entity_get_vector(id, EV_VEC_velocity, velocity)
 velocity[2] += 250.0
 entity_set_vector(id, EV_VEC_velocity, velocity)
 
 entity_set_int(id, EV_INT_gaitsequence, 6)
 }
 return PLUGIN_CONTINUE
}

public _FW_Player_Jump(id)
{
 if(is_user_alive(id) && Multijump[id] && get_user_flags(id) & ADMIN_LEVEL_H)    
 {
 new Flags = pev(id, pev_flags)
 
 if(Flags & FL_WATERJUMP
 
 || pev(id, pev_waterlevel) >= 2
 
 || !(get_pdata_int(id, 246) & IN_JUMP))
 {
 return HAM_IGNORED
 }
 if( Flags & FL_ONGROUND )
 {
 JumpCountv2[ id ] = 0          
 return HAM_IGNORED
 }
 
 new Multi = get_pcvar_num(CvarMultiJump)
 
 if(Multi)
 {
 if(get_pdata_float(id, 251) < 500
 && ++JumpCountv2[id] <= Multi)
 {
 new Float:fVelocity[ 3 ]
 pev(id, pev_velocity, fVelocity)
 fVelocity[ 2 ] = 268.328157
 set_pev(id, pev_velocity, fVelocity)
 
 return HAM_HANDLED
 }
 }
 }
 return HAM_IGNORED
}

public RelvaEvent(id)
{
 if(Unlimited[id])
 {
 new iClip, iAmmo, iWeapName[33]
 new iWeap = get_user_weapon(id, iClip, iAmmo)
 get_weaponname(iWeap, iWeapName, 32)
 
 if(iWeap == CSW_KNIFE ||
 iWeap == CSW_HEGRENADE ||
 iWeap == CSW_SMOKEGRENADE ||
 iWeap == CSW_FLASHBANG ){
 return PLUGIN_HANDLED
 }
 
 new bpammo = cs_get_user_bpammo(id, iWeap)
 if (bpammo <= 199 ) {
 cs_set_user_bpammo(id, iWeap, 200)
 }
 }
 return PLUGIN_HANDLED
}
avatar
Pulber
Komeet
Postitusi : 186
Maine : 18
Liitus : 13/11/2012
Vaata kasutaja profiili

PostitaminePulber on 21.05.15 10:12

Toimib korras tny


[b]EstGaming.eu De_Dust2 Only::. (217.146.72.163:27017)
EstGaming.eu Surf_Ski_2 Only::. (217.146.72.163:27018)
Sponsored content

PostitamineSponsored content

Vaata eelmist teemat Vaata järgmist teemat Tagasi üles

Soovid reklaamidest vabaneda?

Selleks logi sisse või tee endale kasutaja.

Liitu foorumiga

Tee endale kasutaja ning osale aruteludes.


Tee uus kasutaja

Logi sisse

Omad foorumis juba kasutajat? Logi sisse.


Logi sisse

 
Permissions in this forum:
Sa ei saa vastata siinsetele teemadele