VIP:
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>
#include <hamsandwich>
#include <fakemeta>
#pragma semicolon 0
#define PLUGIN "VIP"
#define VERSION "1.6"
#define AUTHOR "Kaster"
public plugin_init(){
register_plugin(PLUGIN, VERSION, AUTHOR);
RegisterHam(Ham_Spawn, "player", "respawn", 1);
register_forward(FM_CmdStart, "CmdStart");
}
public respawn(id)
{
if (!is_user_alive(id))
return;
if(is_user_alive(id))
{
give_item(id, "weapon_deagle")
give_item(id, "weapon_mp5navy")
give_item(id, "weapon_hegrenade")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_flashbang")
give_item(id, "weapon_smokegrenade")
give_item(id, "ammo_9mm")
give_item(id, "ammo_50ae")
set_user_health(id, 175);
set_user_maxspeed(id, - 2.0)
set_user_armor(id, 200)
if(cs_get_user_team(id) == CS_TEAM_T)
{
cs_set_user_model(id, "vip")
}
else
{
cs_set_user_model(id, "vip2")
give_item(id, "item_thighpack")
}
}
else
{
cs_reset_user_model(id)
}
}
public CmdStart(id, uc_handle)
{
static moze_skoczyc;
if(!is_user_alive(id))
return FMRES_IGNORED;
new button = get_uc(uc_handle, UC_Buttons);
new oldbutton = pev(id, pev_oldbuttons);
new flags = pev(id, pev_flags);
if((button & IN_JUMP) && !(flags & FL_ONGROUND) && !(oldbutton & IN_JUMP) && moze_skoczyc & (1<<id))
{
moze_skoczyc &= ~(1<<id)
new Float:velocity[3];
pev(id, pev_velocity, velocity);
velocity[2] = random_float(265.0,285.0);
set_pev(id, pev_velocity, velocity);
}
else if(flags & FL_ONGROUND){
moze_skoczyc |= (1<<id)
}
return FMRES_IGNORED;
}