User
Pass
2FA
 
 

[rezolvat]Ajutor

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Counter-Strike: Help zone
Author Message607
Sa[q]

[FCSB]



Status: Offline
(since 31-01-2018 18:34)
Joined: 24 Apr 2015
Posts: 823, Topics: 125
Location: Bucuresti

Reputation: 90.6
Votes: 10

 
Post Posted: 01-08-2015, 21:27:09 | Translate post to: ... (Click for more languages)

Salut. Puteti sa imi modificati gravitatea la 500 si speedu la 350? Si daca puteti sa puneti vipu sa fie free la toti playeri intre orele 20:00 si 00:00. Multumesc!

SMA:
Code:
#include <amxmodx>
#include <fakemeta>
#include <hamsandwich>
#include <cstrike>
#include <fun>
#include <engine>
#include <xs>

#pragma tabsize 0
#define PLUGIN "VIP"
#define VERSION "1.0"
#define AUTHOR "D3luxe"

// -- | Done
#define ADMIN_VIP read_flags("p")
new const Tag[] = "[Server.Freakz.ro]"
new const g_weapons[] =
{
CSW_P228,
CSW_SCOUT,
CSW_XM1014,
CSW_MAC10,
CSW_AUG,
CSW_ELITE,
CSW_FIVESEVEN,
CSW_UMP45,
CSW_SG550,
CSW_GALI,
CSW_GALIL,
CSW_FAMAS,
CSW_USP,
CSW_GLOCK18,
CSW_AWP,
CSW_MP5NAVY,
CSW_M249,
CSW_M3,
CSW_M4A1,
CSW_TMP,
CSW_G3SG1,
CSW_DEAGLE,
CSW_SG552,
CSW_AK47,
CSW_P90
}

new const g_max_clip[] =
{
13,
10,
7,
30,
30,
30,
20,
25,
30,
35,
35,
25,
12,
20,
10,
30,
100,
8,
30,
30,
20,
7,
30,
30,
50
}

new const g_other_weapons[] =
{
CSW_KNIFE,
CSW_HEGRENADE,
CSW_C4
}

new jumpnum[33] = 0
new bool:dojump[33] = false

#define HE_GRENADE   (1<<0)
#define SMOKE_GRENADE   (1<<1)
#define FLASH_GRENADE   (1<<2)

new Float: cl_pushangle[33][3]
const WEAPONS_BITSUM = (1<<CSW_KNIFE|1<<CSW_HEGRENADE|1<<CSW_FLASHBANG|1<<CSW_SMOKEGRENADE|1<<CSW_C4)
new g_start;

// -- | Cvar-s
new speed_spawn,health_spawn,gravity_spawn,armor_spawn;
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam(Ham_TakeDamage, "player", "Player_TakeDamage")
RegisterHam(Ham_Spawn, "player", "Spawn_player", 1)
RegisterHam(Ham_Killed, "player", "player_killed", 1)
register_message(get_user_msgid("ScoreAttrib"),"vip_scoreboard");
new weapon_name[24];
for (new i = 1; i <= 30; i++)
{
if (!(WEAPONS_BITSUM & 1 << i) && get_weaponname(i, weapon_name, 23))
{
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Pre")
RegisterHam(Ham_Weapon_PrimaryAttack, weapon_name, "fw_Weapon_PrimaryAttack_Post", 1)
}
}
// -- | Cvaruri
speed_spawn = register_cvar("vm_speed_spwn","300")
health_spawn = register_cvar("vm_health_spwn","120")
gravity_spawn = register_cvar("vm_gravity_spwn","0.3")
armor_spawn = register_cvar("vm_armor_spwn","100")
}

public Spawn_player(id)
{
if(is_user_alive(id) && is_user_connected(id) && get_user_flags(id) & ADMIN_VIP || g_start)
{
set_user_health(id,get_pcvar_num(health_spawn));
set_user_armor(id,get_user_armor(id) + get_pcvar_num(armor_spawn));
set_user_maxspeed(id,get_pcvar_float(speed_spawn));
set_user_gravity(id,get_pcvar_float(gravity_spawn));
set_user_footsteps(id,1);
}
}

public vip_scoreboard(const MsgId, const MsgType, const MsgDest) {
static id;
id = get_msg_arg_int(1);
if(get_user_flags(id) & ADMIN_VIP)
set_msg_arg_int(2, ARG_BYTE, (1 << 2 ));
}

public fw_Weapon_PrimaryAttack_Pre(entity)
{
new id = pev(entity, pev_owner)
if (get_user_flags(id) & ADMIN_VIP || g_start)
{
pev(id, pev_punchangle, cl_pushangle[id])
return HAM_IGNORED;
}
return HAM_IGNORED;
}

public fw_Weapon_PrimaryAttack_Post(entity)
{
new id = pev(entity, pev_owner)

if (get_user_flags(id) & ADMIN_VIP || g_start)
{
new Float: push[3]
pev(id, pev_punchangle, push)
xs_vec_sub(push, cl_pushangle[id], push)
xs_vec_mul_scalar(push, 0.0, push)
xs_vec_add(push, cl_pushangle[id], push)
set_pev(id, pev_punchangle, push)
return HAM_IGNORED;
}
return HAM_IGNORED;
}

public player_killed(victim,attacker,shouldgib)
{
if(!is_user_connected(victim) || !is_user_alive(attacker))
return
if(get_user_flags(attacker) & ADMIN_VIP || g_start)
{
for (new a = 0; a < sizeof (g_other_weapons); a++)
if (get_user_weapon( attacker ) == g_other_weapons[a])
return

for (new a = 0; a < sizeof (g_weapons); a++){
new weapon = find_ent_by_owner( -1, g_weapons[ a ], attacker );
if (get_user_weapon( attacker ) == g_weapons[a])
{
if( weapon )
{
client_cmd(attacker, "spk ^"items/9mmclip1.wav^"")
cs_set_weapon_ammo(weapon, g_max_clip[a])
}
return
}
}
if(get_pdata_int(victim, 75) == HIT_HEAD)
set_user_health(attacker, clamp(get_user_health(attacker) + 15, 0, 150));
else
set_user_health(attacker, clamp(get_user_health(attacker) + 10, 0, 150));
}
}

public client_putinserver(id)
{
if(get_user_flags(id) & ADMIN_VIP)
set_task(2.0,"mesaj_connect");
jumpnum[id] = 0
dojump[id] = false
verifica(id)
}

public client_disconnect(id)
{
if(get_user_flags(id) & ADMIN_VIP)
set_task(2.0,"mesaj_disconnect");
jumpnum[id] = 0
dojump[id] = false
}

public verifica(id)
{
new h, m, s;
time(h, m, s);
if(h >= 20 && h < 22)
{
g_start = true;
if(h == 20 && m == 0){
ChatColor(0,"!g%s!yAcum este !teamVIP FREE .",Tag);
}else if(h == 22 && m == 0){
g_start = false;
ChatColor(0,"!g%s!yS-a terminat !teamVIP FREE.",Tag);
}
}
}

public client_PreThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(!(get_user_flags(id) & ADMIN_VIP) || !g_start) return PLUGIN_CONTINUE
new nbut = get_user_button(id)
new obut = get_user_oldbutton(id)
if((nbut & IN_JUMP) && !(get_entity_flags(id) & FL_ONGROUND) && !(obut & IN_JUMP))
{
if(jumpnum[id] < 2)
{
dojump[id] = true
jumpnum[id]++
return PLUGIN_CONTINUE
}
}
if((nbut & IN_JUMP) && (get_entity_flags(id) & FL_ONGROUND))
{
jumpnum[id] = 0
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

public client_PostThink(id)
{
if(!is_user_alive(id)) return PLUGIN_CONTINUE
if(!(get_user_flags(id) & ADMIN_VIP) || !g_start) return PLUGIN_CONTINUE
if(dojump[id] == true)
{
new Float:velocity[3]   
entity_get_vector(id,EV_VEC_velocity,velocity)
velocity[2] = random_float(265.0,285.0)
entity_set_vector(id,EV_VEC_velocity,velocity)
dojump[id] = false
return PLUGIN_CONTINUE
}
return PLUGIN_CONTINUE
}

public mesaj_connect(id)
{
new name[33];
get_user_name(id,name,sizeof(name)-1);
ChatColor(0,"!g[!yAtentie!g]!team*!yVIP!team* !g%s!y s-a connectat.",name);
}

public mesaj_disconnect(id)
{
new name[33];
get_user_name(id,name,sizeof(name)-1);
ChatColor(0,"!g[!yAtentie!g]!team*!yVIP!team* !g%s!y s-a deconnectat.",name);
}

public Player_TakeDamage(victim, inflicator, attacker, Float:damage, damage_type, bitsDamage)
{
if(!is_user_connected(attacker))
return PLUGIN_HANDLED
if(get_user_team(attacker) == get_user_team(victim) || !is_user_alive(attacker) || !is_user_alive(victim))
return PLUGIN_HANDLED

if(get_user_flags(attacker) & ADMIN_VIP || g_start)
SetHamParamFloat(4, damage+damage/65);

return PLUGIN_HANDLED
}

//********************STOCK-URI********************//
stock ChatColor(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[191]
vformat(msg, 190, input, 3)

replace_all(msg, 190, "!g", "^4")
replace_all(msg, 190, "!y", "^1")
replace_all(msg, 190, "!team", "^3")

if (id) players[0] = id; else get_players(players, count, "ch")
{
for (new i = 0; i < count; i++)
{
if (is_user_connected(players[i]))
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("SayText"), _, players[i]);
write_byte(players[i]);
write_string(msg);
message_end();
}
}
}
}

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
destroi112

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 01-08-2015, 23:07:56 | Translate post to: ... (Click for more languages)

Vezi iti modifici si tu numele server-ului de aici.
new const Tag[] = "[Server.Freakz.ro]"
in rest poftim.
Spoiler:

Compilezi aici -> https://amx.freakz.ro/
Iei ce ti-am dat eu si pui in notepad si compilezi in sus.



Retired from Amxmodx

0 0
  
Back to top
View user's profile Send private message
Sa[q]

[FCSB]



Status: Offline
(since 31-01-2018 18:34)
Joined: 24 Apr 2015
Posts: 823, Topics: 125
Location: Bucuresti

Reputation: 90.6
Votes: 10

 
Post Posted: 02-08-2015, 11:05:20 | Translate post to: ... (Click for more languages)

Rezolvat.
Puteti da T/C

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID

  Topic locked


Topic is closed, you cannot post any messages in it anymore

Locked by -P!C@-, 02 August 2015 09:11



 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Counter-Strike: Help zone  


The time now is 02-05-2024, 21:32:17
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x