Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <amxmisc>
- #include <engine>
- #define FLAG_A (1<<0)
- #define FLAG_B (1<<1)
- #define FLAG_C (1<<2)
- #define FLAG_D (1<<3)
- #define FLAG_E (1<<4)
- #define FLAG_K (1<<10)
- native zv_get_user_flags(Player)
- new bool:Jump[33], JumpNum[33];
- public client_PreThink(id)
- {
- if(!is_user_alive(id) || !is_vip(id))
- return;
- new a = get_user_button(id);
- new b = get_user_oldbutton(id);
- if((a & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(b & IN_JUMP))
- {
- if(JumpNum[id] < 3)
- {
- Jump[id] = true;
- JumpNum[id]++;
- }
- }
- if((a & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
- JumpNum[id] = 0;
- }
- public client_PostThink(id)
- {
- if(!is_user_alive(id) || !is_vip(id))
- return;
- if(Jump[id])
- {
- new Float:vel[3];
- entity_get_vector(id, EV_VEC_velocity, vel);
- vel[2] = random_float(265.0, 285.0);
- entity_set_vector(id, EV_VEC_velocity, vel);
- }
- }
- stock is_vip(Player)
- {
- new f = zv_get_user_flags(Player);
- if(f & FLAG_A || f & FLAG_B || f & FLAG_C || f & FLAG_D || f & FLAG_E || f & FLAG_K)
- return true;
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement