Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
Ajutor
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
489
Gaby*
[Mentally Stable]
Status: Offline
(since 14-10-2018 13:46)
Joined: 13 Jul 2015
Posts: 95
,
Topics: 25
Location:
Romania
Reputation:
122.1
Votes
: 4
Posted: 19-10-2015, 16:10:20
| Translate post to:
... (
Click for more languages
)
imi poate copila cinva acest plugin va rog frumos
Spoiler:
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#include <fcs>
#define PLUGIN "Furien: Bat"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define fm_precache_model(%1) engfunc(EngFunc_PrecacheModel,%1)
#define fm_precache_sound(%1) engfunc(EngFunc_PrecacheSound,%1)
#define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1)
#define fm_drop_to_floor(%1) engfunc(EngFunc_DropToFloor,%1)
#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
#define fm_set_user_gravity(%1,%2) set_pev(%1,pev_gravity,%2)
#define PET_FLAG pev_flTimeStepSound
#define PET_KILLED 389
static const pet_model[] = "models/Yuri.mdl"
static const pet_sounds[][] = { "bullchicken/bc_die1.wav", "bullchicken/bc_die2.wav", "bullchicken/bc_die3.wav", "bullchicken/bc_idle1.wav", "bullchicken/bc_pain3.wav" }
static const pet_idle = 13
static const pet_run = 13
static const pet_die = 5
static const Float:pet_idle_speed = 0.3
static const Float:pet_run_speed = 10.0
static const Float:player_gravity = 0.65
new item_pet[33]
new item_have[33]
new item_at_spawn[33]
new Float:item_leaptime[33]
new bool:g_has_speed[33]
new maxplayers, g_msgSayText
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","DeathMsg","a")
register_event("HLTV","HLTV", "a","1=0", "2=0")
register_forward(FM_Think,"FM_Think_hook")
register_forward(FM_PlayerPreThink, "FM_PlayerPreThink_hook")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
//RegisterHam(Ham_Touch, "info_target", "player_touch")
register_clcmd("say /pet", "buypet")
register_clcmd("say_team /pet", "buypet")
maxplayers = get_maxplayers()
g_msgSayText = get_user_msgid("SayText")
}
public plugin_natives()
register_native("set_user_pet", "native_set_pet", 1)
public native_set_pet(id)
buypet(id)
public plugin_precache()
{
new i = 0
for(i = 0; i < sizeof pet_sounds; i++)
fm_precache_sound(pet_sounds[i])
fm_precache_model(pet_model)
}
public HLTV()
{
new entid = -1
while((entid = fm_find_ent_by_class(entid, "zp_bat")))
{
if(pev(entid,PET_FLAG) == PET_KILLED)
{
fm_remove_entity(entid)
}
}
}
public DeathMsg()
{
new id = read_data(2)
if(item_have[id])
{
kill_pet(id)
item_have[id] = 0
}
if(cs_get_user_team(id) == CS_TEAM_T)
item_have[id] = 0
if(g_has_speed[id])
g_has_speed[id] = false
}
public buypet(id)
{
if (!is_user_alive(id))
{
client_printcolor(id, "^4[PET]^1 Nu poti cumpara pet cand esti mort.");
return PLUGIN_HANDLED;
}
if (cs_get_user_team(id) != CS_TEAM_CT)
{
client_printcolor(id, "^4[PET]^1 Numai^3 Anti-furienii^1 pot cumpara pet.");
return PLUGIN_HANDLED;
}
if (!item_have[id])
{
if (fcs_get_user_credits(id) >= 100)
{
fcs_set_user_credits(id, fcs_get_user_credits(id) - 100);
client_printcolor(id, "^4[PET]^1 Ai cumparat^3 PET.");
create_pet(id)
}else
client_printcolor(id, "^4[PET]^1 Nu ai destule^3 credite.");
}else
client_printcolor(id, "^4[PET]^1 Detii deja un pet!");
return PLUGIN_CONTINUE;
}
public kill_pet(id)
{
if(pev_valid(item_pet[id]))
{
set_pev(item_pet[id],pev_sequence,pet_die)
set_pev(item_pet[id],pev_gaitsequence,pet_die)
set_pev(item_pet[id],pev_framerate,1.0)
set_pev(item_pet[id],PET_FLAG,PET_KILLED)
fm_drop_to_floor(item_pet[id])
item_have[id] = 0
g_has_speed[id] = false
}
item_pet[id] = 0
}
public player_spawn(player)
{
if(is_user_alive(player))
{
if (cs_get_user_team(player) != CS_TEAM_CT)
{
kill_pet(player)
item_have[player] = 0
}
if(item_have[player])
{
fm_set_user_gravity(player, player_gravity)
set_user_health(player, get_user_health(player) + 100)
set_user_armor(player, get_user_armor(player) + 100)
g_has_speed[player] = true
}
else if(item_at_spawn[player])
{
create_pet(player)
item_at_spawn[player] = 0
g_has_speed[player] = true
}
}
}
public create_pet(id)
{
if(item_have[id])
{
client_printcolor(id, "^4[PET]^1 Detii deja un^3 pet.")
return PLUGIN_HANDLED
}
else if(!is_user_alive(id))
{
client_printcolor(id, "^4[PET]^1 Petul iti va aparea runda viitoare.")
item_at_spawn[id] = 1
return PLUGIN_HANDLED
}
else
{
item_pet[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
set_pev(item_pet[id],pev_classname,"zp_bat")
engfunc(EngFunc_SetModel,item_pet[id],pet_model)
new Float:origin[3]
pev(id,pev_origin,origin)
set_pev(item_pet[id],pev_origin,origin)
set_pev(item_pet[id],pev_solid,SOLID_TRIGGER)
set_pev(item_pet[id],pev_movetype,MOVETYPE_FLY)
set_pev(item_pet[id],pev_owner,33)
set_pev(item_pet[id],pev_nextthink,1.0)
set_pev(item_pet[id],pev_sequence,0)
set_pev(item_pet[id],pev_gaitsequence,0)
set_pev(item_pet[id],pev_framerate,1.0)
set_pev(item_pet[id], pev_renderfx, kRenderFxGlowShell)
set_pev(item_pet[id], pev_rendercolor, Float:{0.0, 0.0, 200.0})
fm_set_user_gravity(id,player_gravity)
set_user_health(id, get_user_health(id) + 250)
set_user_armor(id, get_user_armor(id) + 350)
engfunc(EngFunc_EmitSound,item_pet[id],CHAN_AUTO,pet_sounds[random_num(0,sizeof pet_sounds - 1)],1.0, 1.2, 0, PITCH_NORM)
item_have[id] = 1
g_has_speed[id] = true
}
return PLUGIN_HANDLED
}
public FM_Think_hook(ent)
{
for(new i = 0; i <= maxplayers; i++)
{
if(ent == item_pet[i])
{
static Float:origin[3]
static Float:origin2[3]
static Float:velocity[3]
pev(ent,pev_origin,origin2)
get_offset_origin_body(i,Float:{50.0,0.0,0.0},origin)
if(get_distance_f(origin,origin2) > 300.0)
{
set_pev(ent,pev_origin,origin)
}
else if(get_distance_f(origin,origin2) > 80.0)
{
get_speed_vector(origin2,origin,250.0,velocity)
set_pev(ent,pev_velocity,velocity)
if(pev(ent,pev_sequence) != pet_run || pev(ent,pev_framerate) != pet_run_speed)
{
set_pev(ent,pev_sequence,pet_run)
set_pev(ent,pev_gaitsequence,pet_run)
set_pev(ent,pev_framerate,pet_run_speed)
}
}
else if(get_distance_f(origin,origin2) < 75.0)
{
if(pev(ent,pev_sequence) != pet_idle || pev(ent,pev_framerate) != pet_idle_speed)
{
set_pev(ent,pev_sequence,pet_idle)
set_pev(ent,pev_gaitsequence,pet_idle)
set_pev(ent,pev_framerate,pet_idle_speed)
}
set_pev(ent,pev_velocity,Float:{0.0,0.0,0.0})
}
pev(i,pev_origin,origin)
origin[2] = origin2[2]
entity_set_aim(ent,origin)
set_pev(ent,pev_nextthink,1.0)
break
}
}
}
public FM_PlayerPreThink_hook(id)
{
if (!is_user_alive(id))
return
if(allowed_leap(id))
{
static Float:velocity[3]
velocity_by_aim(id, 500, velocity)
velocity[2] = 300.0
set_pev(id, pev_velocity, velocity)
item_leaptime[id] = get_gametime()
}
}
public allowed_leap(id)
{
if(!item_have[id])
return false
if (!(pev(id, pev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
return false
static buttons
buttons = pev(id, pev_button)
if (!is_user_bot(id) && (!(buttons & IN_JUMP) || !(buttons & IN_DUCK)))
return false
if (get_gametime() - item_leaptime[id] < 3)
return false
return true
}
public is_a_player(ent)
{
if(ent > 0 && ent < 33)
return true
return false
}
public remove_pet(ent)
{
if(pev_valid(ent))
fm_remove_entity(ent)
}
// Get entity's speed (from fakemeta_util)
stock fm_get_speed(entity)
{
static Float:velocity[3]
pev(entity, pev_velocity, velocity)
return floatround(vector_length(velocity));
}
stock get_offset_origin_body(ent,const Float:offset[3],Float:origin[3])
{
if(!pev_valid(ent))
return 0;
new Float:angle[3]
pev(ent,pev_angles,angle)
pev(ent,pev_origin,origin)
origin[0] += floatcos(angle[1],degrees) * offset[0]
origin[1] += floatsin(angle[1],degrees) * offset[0]
origin[1] += floatcos(angle[1],degrees) * offset[1]
origin[0] += floatsin(angle[1],degrees) * offset[1]
return 1;
}
stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speed, Float:new_velocity[3])
{
new_velocity[0] = origin2[0] - origin1[0]
new_velocity[1] = origin2[1] - origin1[1]
new_velocity[2] = origin2[2] - origin1[2]
new Float:num = floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
new_velocity[0] *= num
new_velocity[1] *= num
new_velocity[2] *= num
return 1;
}
stock entity_set_aim(ent,const Float:origin2[3],bone=0)
{
if(!pev_valid(ent))
return 0;
static Float:origin[3]
origin[0] = origin2[0]
origin[1] = origin2[1]
origin[2] = origin2[2]
static Float:ent_origin[3], Float:angles[3]
if(bone)
engfunc(EngFunc_GetBonePosition,ent,bone,ent_origin,angles)
else
pev(ent,pev_origin,ent_origin)
origin[0] -= ent_origin[0]
origin[1] -= ent_origin[1]
origin[2] -= ent_origin[2]
static Float:v_length
v_length = vector_length(origin)
static Float:aim_vector[3]
aim_vector[0] = origin[0] / v_length
aim_vector[1] = origin[1] / v_length
aim_vector[2] = origin[2] / v_length
static Float:new_angles[3]
vector_to_angle(aim_vector,new_angles)
new_angles[0] *= -1
if(new_angles[1]>180.0) new_angles[1] -= 360
if(new_angles[1]<-180.0) new_angles[1] += 360
if(new_angles[1]==180.0 || new_angles[1]==-180.0) new_angles[1]=-179.999999
set_pev(ent,pev_angles,new_angles)
set_pev(ent,pev_fixangle,1)
return 1;
}
stock client_printcolor(id, const input[], any:...)
{
static iPlayersNum[32], iCount; iCount = 1
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4") // green txt
replace_all(szMsg, 190, "/y", "^1") // orange txt
replace_all(szMsg, 190, "/ctr", "^3") // team txt
replace_all(szMsg, 190, "/w", "^0") // team txt
if(id) iPlayersNum[0] = id
else get_players(iPlayersNum, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if (is_user_connected(iPlayersNum[i]))
{
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayersNum[i])
write_byte(iPlayersNum[i])
write_string(szMsg)
message_end()
}
}
}
0
0
Back to top
Iulian3D
[Mentally Stable]
Status: Offline
(since 04-03-2020 22:38)
Joined: 21 Jun 2015
Posts: 227
,
Topics: 37
Location:
Buftea .
Reputation:
178.8
Votes
: 4
Posted: 19-10-2015, 16:25:01
| Translate post to:
... (
Click for more languages
)
NU merge compilat :
plugin.sma(9) : fatal error 100: cannot read from file: "fcs"
Compilation aborted.
1 Error.
Done.
Ca sã-l compilez am nevoie de libraria fcs .
Alte pluginuri le poți compila aici
https://amx.freakz.ro/
0
0
Back to top
GoguSM
[.: ZMGO.FREAKZ.RO :.]
Status: Offline
(since 16-03-2022 00:38)
Joined: 24 Aug 2013
Posts: 1516
,
Topics: 71
Location:
Brasov
Reputation:
1144
Votes
: 95
Posted: 19-10-2015, 17:23:41
| Translate post to:
... (
Click for more languages
)
E asa greu sa includeti nativele in plugin ... mare branza, poftim.
Spoiler:
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#include <hamsandwich>
#include <fun>
#if defined _fcs_included
#endinput
#endif
#define _fcs_included
/*
* Returns a players credits
*
* @param client - The player index to get points of
*
* @return The credits client
*
*/
native fcs_get_user_credits(client);
/*
* Sets <credits> to client
*
* @param client - The player index to set points to
* @param credits - The amount of credits to set to client
*
* @return The credits of client
*
*/
native fcs_set_user_credits(client, credits);
/*
* Adds <credits> points to client
*
* @param client - The player index to add points to
* @param credits - The amount of credits to add to client
*
* @return The credits of client
*
*/
stock fcs_add_user_credits(client, credits)
{
return fcs_set_user_credits(client, fcs_get_user_credits(client) + credits);
}
/*
* Subtracts <credits> from client
*
* @param client - The player index to subtract points from
* @param credits - The amount of credits to substract from client
*
* @return The credits of client
*
*/
stock fcs_sub_user_credits(client, credits)
{
return fcs_set_user_credits(client, fcs_get_user_credits(client) - credits);
}
#define PLUGIN "Furien: Bat"
#define VERSION "1.0"
#define AUTHOR "Sn!ff3r"
#define fm_precache_model(%1) engfunc(EngFunc_PrecacheModel,%1)
#define fm_precache_sound(%1) engfunc(EngFunc_PrecacheSound,%1)
#define fm_remove_entity(%1) engfunc(EngFunc_RemoveEntity, %1)
#define fm_drop_to_floor(%1) engfunc(EngFunc_DropToFloor,%1)
#define fm_find_ent_by_class(%1,%2) engfunc(EngFunc_FindEntityByString, %1, "classname", %2)
#define fm_set_user_gravity(%1,%2) set_pev(%1,pev_gravity,%2)
#define PET_FLAG pev_flTimeStepSound
#define PET_KILLED 389
static const pet_model[] = "models/Yuri.mdl"
static const pet_sounds[][] = { "bullchicken/bc_die1.wav", "bullchicken/bc_die2.wav", "bullchicken/bc_die3.wav", "bullchicken/bc_idle1.wav", "bullchicken/bc_pain3.wav" }
static const pet_idle = 13
static const pet_run = 13
static const pet_die = 5
static const Float:pet_idle_speed = 0.3
static const Float:pet_run_speed = 10.0
static const Float:player_gravity = 0.65
new item_pet[33]
new item_have[33]
new item_at_spawn[33]
new Float:item_leaptime[33]
new bool:g_has_speed[33]
new maxplayers, g_msgSayText
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_event("DeathMsg","DeathMsg","a")
register_event("HLTV","HLTV", "a","1=0", "2=0")
register_forward(FM_Think,"FM_Think_hook")
register_forward(FM_PlayerPreThink, "FM_PlayerPreThink_hook")
RegisterHam(Ham_Spawn, "player", "player_spawn", 1)
//RegisterHam(Ham_Touch, "info_target", "player_touch")
register_clcmd("say /pet", "buypet")
register_clcmd("say_team /pet", "buypet")
maxplayers = get_maxplayers()
g_msgSayText = get_user_msgid("SayText")
}
public plugin_natives()
register_native("set_user_pet", "native_set_pet", 1)
public native_set_pet(id)
buypet(id)
public plugin_precache()
{
new i = 0
for(i = 0; i < sizeof pet_sounds; i++)
fm_precache_sound(pet_sounds[i])
fm_precache_model(pet_model)
}
public HLTV()
{
new entid = -1
while((entid = fm_find_ent_by_class(entid, "zp_bat")))
{
if(pev(entid,PET_FLAG) == PET_KILLED)
{
fm_remove_entity(entid)
}
}
}
public DeathMsg()
{
new id = read_data(2)
if(item_have[id])
{
kill_pet(id)
item_have[id] = 0
}
if(cs_get_user_team(id) == CS_TEAM_T)
item_have[id] = 0
if(g_has_speed[id])
g_has_speed[id] = false
}
public buypet(id)
{
if (!is_user_alive(id))
{
client_printcolor(id, "^4[PET]^1 Nu poti cumpara pet cand esti mort.");
return PLUGIN_HANDLED;
}
if (cs_get_user_team(id) != CS_TEAM_CT)
{
client_printcolor(id, "^4[PET]^1 Numai^3 Anti-furienii^1 pot cumpara pet.");
return PLUGIN_HANDLED;
}
if (!item_have[id])
{
if (fcs_get_user_credits(id) >= 100)
{
fcs_set_user_credits(id, fcs_get_user_credits(id) - 100);
client_printcolor(id, "^4[PET]^1 Ai cumparat^3 PET.");
create_pet(id)
}else
client_printcolor(id, "^4[PET]^1 Nu ai destule^3 credite.");
}else
client_printcolor(id, "^4[PET]^1 Detii deja un pet!");
return PLUGIN_CONTINUE;
}
public kill_pet(id)
{
if(pev_valid(item_pet[id]))
{
set_pev(item_pet[id],pev_sequence,pet_die)
set_pev(item_pet[id],pev_gaitsequence,pet_die)
set_pev(item_pet[id],pev_framerate,1.0)
set_pev(item_pet[id],PET_FLAG,PET_KILLED)
fm_drop_to_floor(item_pet[id])
item_have[id] = 0
g_has_speed[id] = false
}
item_pet[id] = 0
}
public player_spawn(player)
{
if(is_user_alive(player))
{
if (cs_get_user_team(player) != CS_TEAM_CT)
{
kill_pet(player)
item_have[player] = 0
}
if(item_have[player])
{
fm_set_user_gravity(player, player_gravity)
set_user_health(player, get_user_health(player) + 100)
set_user_armor(player, get_user_armor(player) + 100)
g_has_speed[player] = true
}
else if(item_at_spawn[player])
{
create_pet(player)
item_at_spawn[player] = 0
g_has_speed[player] = true
}
}
}
public create_pet(id)
{
if(item_have[id])
{
client_printcolor(id, "^4[PET]^1 Detii deja un^3 pet.")
return PLUGIN_HANDLED
}
else if(!is_user_alive(id))
{
client_printcolor(id, "^4[PET]^1 Petul iti va aparea runda viitoare.")
item_at_spawn[id] = 1
return PLUGIN_HANDLED
}
else
{
item_pet[id] = engfunc(EngFunc_CreateNamedEntity, engfunc(EngFunc_AllocString,"info_target"))
set_pev(item_pet[id],pev_classname,"zp_bat")
engfunc(EngFunc_SetModel,item_pet[id],pet_model)
new Float:origin[3]
pev(id,pev_origin,origin)
set_pev(item_pet[id],pev_origin,origin)
set_pev(item_pet[id],pev_solid,SOLID_TRIGGER)
set_pev(item_pet[id],pev_movetype,MOVETYPE_FLY)
set_pev(item_pet[id],pev_owner,33)
set_pev(item_pet[id],pev_nextthink,1.0)
set_pev(item_pet[id],pev_sequence,0)
set_pev(item_pet[id],pev_gaitsequence,0)
set_pev(item_pet[id],pev_framerate,1.0)
set_pev(item_pet[id], pev_renderfx, kRenderFxGlowShell)
set_pev(item_pet[id], pev_rendercolor, Float:{0.0, 0.0, 200.0})
fm_set_user_gravity(id,player_gravity)
set_user_health(id, get_user_health(id) + 250)
set_user_armor(id, get_user_armor(id) + 350)
engfunc(EngFunc_EmitSound,item_pet[id],CHAN_AUTO,pet_sounds[random_num(0,sizeof pet_sounds - 1)],1.0, 1.2, 0, PITCH_NORM)
item_have[id] = 1
g_has_speed[id] = true
}
return PLUGIN_HANDLED
}
public FM_Think_hook(ent)
{
for(new i = 0; i <= maxplayers; i++)
{
if(ent == item_pet[i])
{
static Float:origin[3]
static Float:origin2[3]
static Float:velocity[3]
pev(ent,pev_origin,origin2)
get_offset_origin_body(i,Float:{50.0,0.0,0.0},origin)
if(get_distance_f(origin,origin2) > 300.0)
{
set_pev(ent,pev_origin,origin)
}
else if(get_distance_f(origin,origin2) > 80.0)
{
get_speed_vector(origin2,origin,250.0,velocity)
set_pev(ent,pev_velocity,velocity)
if(pev(ent,pev_sequence) != pet_run || pev(ent,pev_framerate) != pet_run_speed)
{
set_pev(ent,pev_sequence,pet_run)
set_pev(ent,pev_gaitsequence,pet_run)
set_pev(ent,pev_framerate,pet_run_speed)
}
}
else if(get_distance_f(origin,origin2) < 75.0)
{
if(pev(ent,pev_sequence) != pet_idle || pev(ent,pev_framerate) != pet_idle_speed)
{
set_pev(ent,pev_sequence,pet_idle)
set_pev(ent,pev_gaitsequence,pet_idle)
set_pev(ent,pev_framerate,pet_idle_speed)
}
set_pev(ent,pev_velocity,Float:{0.0,0.0,0.0})
}
pev(i,pev_origin,origin)
origin[2] = origin2[2]
entity_set_aim(ent,origin)
set_pev(ent,pev_nextthink,1.0)
break
}
}
}
public FM_PlayerPreThink_hook(id)
{
if (!is_user_alive(id))
return
if(allowed_leap(id))
{
static Float:velocity[3]
velocity_by_aim(id, 500, velocity)
velocity[2] = 300.0
set_pev(id, pev_velocity, velocity)
item_leaptime[id] = get_gametime()
}
}
public allowed_leap(id)
{
if(!item_have[id])
return false
if (!(pev(id, pev_flags) & FL_ONGROUND) || fm_get_speed(id) < 80)
return false
static buttons
buttons = pev(id, pev_button)
if (!is_user_bot(id) && (!(buttons & IN_JUMP) || !(buttons & IN_DUCK)))
return false
if (get_gametime() - item_leaptime[id] < 3)
return false
return true
}
public is_a_player(ent)
{
if(ent > 0 && ent < 33)
return true
return false
}
public remove_pet(ent)
{
if(pev_valid(ent))
fm_remove_entity(ent)
}
// Get entity's speed (from fakemeta_util)
stock fm_get_speed(entity)
{
static Float:velocity[3]
pev(entity, pev_velocity, velocity)
return floatround(vector_length(velocity));
}
stock get_offset_origin_body(ent,const Float:offset[3],Float:origin[3])
{
if(!pev_valid(ent))
return 0;
new Float:angle[3]
pev(ent,pev_angles,angle)
pev(ent,pev_origin,origin)
origin[0] += floatcos(angle[1],degrees) * offset[0]
origin[1] += floatsin(angle[1],degrees) * offset[0]
origin[1] += floatcos(angle[1],degrees) * offset[1]
origin[0] += floatsin(angle[1],degrees) * offset[1]
return 1;
}
stock get_speed_vector(const Float:origin1[3],const Float:origin2[3],Float:speed, Float:new_velocity[3])
{
new_velocity[0] = origin2[0] - origin1[0]
new_velocity[1] = origin2[1] - origin1[1]
new_velocity[2] = origin2[2] - origin1[2]
new Float:num = floatsqroot(speed*speed / (new_velocity[0]*new_velocity[0] + new_velocity[1]*new_velocity[1] + new_velocity[2]*new_velocity[2]))
new_velocity[0] *= num
new_velocity[1] *= num
new_velocity[2] *= num
return 1;
}
stock entity_set_aim(ent,const Float:origin2[3],bone=0)
{
if(!pev_valid(ent))
return 0;
static Float:origin[3]
origin[0] = origin2[0]
origin[1] = origin2[1]
origin[2] = origin2[2]
static Float:ent_origin[3], Float:angles[3]
if(bone)
engfunc(EngFunc_GetBonePosition,ent,bone,ent_origin,angles)
else
pev(ent,pev_origin,ent_origin)
origin[0] -= ent_origin[0]
origin[1] -= ent_origin[1]
origin[2] -= ent_origin[2]
static Float:v_length
v_length = vector_length(origin)
static Float:aim_vector[3]
aim_vector[0] = origin[0] / v_length
aim_vector[1] = origin[1] / v_length
aim_vector[2] = origin[2] / v_length
static Float:new_angles[3]
vector_to_angle(aim_vector,new_angles)
new_angles[0] *= -1
if(new_angles[1]>180.0) new_angles[1] -= 360
if(new_angles[1]<-180.0) new_angles[1] += 360
if(new_angles[1]==180.0 || new_angles[1]==-180.0) new_angles[1]=-179.999999
set_pev(ent,pev_angles,new_angles)
set_pev(ent,pev_fixangle,1)
return 1;
}
stock client_printcolor(id, const input[], any:...)
{
static iPlayersNum[32], iCount; iCount = 1
static szMsg[191]
vformat(szMsg, charsmax(szMsg), input, 3)
replace_all(szMsg, 190, "/g", "^4") // green txt
replace_all(szMsg, 190, "/y", "^1") // orange txt
replace_all(szMsg, 190, "/ctr", "^3") // team txt
replace_all(szMsg, 190, "/w", "^0") // team txt
if(id) iPlayersNum[0] = id
else get_players(iPlayersNum, iCount, "ch")
for (new i = 0; i < iCount; i++)
{
if (is_user_connected(iPlayersNum[i]))
{
message_begin(MSG_ONE_UNRELIABLE, g_msgSayText, _, iPlayersNum[i])
write_byte(iPlayersNum[i])
write_string(szMsg)
message_end()
}
}
}
0
0
Back to top
Gaby*
[Mentally Stable]
Status: Offline
(since 14-10-2018 13:46)
Joined: 13 Jul 2015
Posts: 95
,
Topics: 25
Location:
Romania
Reputation:
122.1
Votes
: 4
Posted: 20-10-2015, 15:00:59
| Translate post to:
... (
Click for more languages
)
multumesc mai am devoie si de acesta..
DarK m4a1 sa aiba 260 de gloante ,iar pistolul sa traga cu rachete si sa aibe 30 de rachete"rachetele sa aiba damage de 5%
HP
si sa arunce furienii in aer ...
[/spoiler]/*
Credite:
hadesownage: Base code for regeneration from "Furien VIP".
Sophia - Dias: "Drop User Weapon".
*/
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <fun>
#include <cstrike>
#include <hamsandwich>
#include <fakemeta>
#include <xs>
#include <colorchat>
//////////////////////////////////////////////////////
#define PLUGIN "Furien VIP"
#define VERSION "0.1"
#define AUTHOR "eNd."
///////////////////////////////////// /////////////////Pragma , only ;
#pragma semicolon 1
//////////////////////////////////////////////////////Acces LEVEL.
#define VIP_LEVEL ADMIN_LEVEL_H
//////////////////////////////////////////////////////Weapons
const WEAPONS_PISTOLS = (1<<CSW_P228)|(1<<CSW_ELITE)|(1<<CSW_FIVESEVEN)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_DEAGLE);
const WEAPONS_SHOTGUNS = (1<<CSW_XM1014)|(1<<CSW_M3);
const WEAPONS_SUBMACHINEGUNS = (1<<CSW_MAC10)|(1<<CSW_UMP45)|(1<<CSW_MP5NAVY)|(1<<CSW_TMP)|(1<<CSW_P90);
const WEAPONS_RIFLES = (1<<CSW_SCOUT)|(1<<CSW_AUG)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_M4A1)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47);
const WEAPONS_MACHINEGUNS = (1<<CSW_M249);
const VALID_WEAPONS = WEAPONS_PISTOLS|WEAPONS_SHOTGUNS|WEAPONS_SUBMACHINEGUNS|WEAPONS_RIFLES|WEAPONS_MACHINEGUNS;
#define WEAPONS (WEAPONS_SHOTGUNS|WEAPONS_SUBMACHINEGUNS|WEAPONS_RIFLES|WEAPONS_MACHINEGUNS|WEAPONS_PISTOLS)
//////////////////////////////////////////////////////Prefix
new szPrefix[] = "[Furien VIP]";
//////////////////////////////////////////////////////Cvar1
new
furien_on, furien_bind, furien_message_connect, furien_scoreboard;
//////////////////////////////////////////////////////Cvar 2
new
furien_give_stuff, furien_give_ultimate;
//////////////////////////////////////////////////////Cvar 3
new
furien_health_on, furien_health_max, furien_health;
//////////////////////////////////////////////////////HUD
new
g_bHud;
//////////////////////////////////////////////////////Models
new Golden_Ak_V[64] = "models/furien_vip/v_golden_ak47.mdl";
new Golden_Ak_P[64] = "models/furien_vip/p_golden_ak47.mdl";
new Golden_Deagle_V[64] = "models/furien_vip/v_m79g.mdl";
new Golden_Deagle_P[64] = "models/furien_vip/p_m79g.mdl";
new Golden_M4a1_V[64] = "models/furien_vip/v_darkm4a1.mdl";
new Golden_M4a1_P[64] = "models/furien_vip/v_darkm4a1.mdl";
new Onion_V[64] = "models/furien_vip/v_master.mdl";
new Knife_P[64] = "models/p_knife.mdl";
//////////////////////////////////////////////////////Texture
new Drop_Texture;
//////////////////////////////////////////////////////Bools
new
bool:g_bGoldenAk[33],bool:g_bGoldenM4a1[33],bool:g_bGoldenDeagle[33];
new
bool:g_bOnion[33];
new
bool:g_bLifeSteal[33],g_bDrop[33];
new
bool:g_bCoolDown[33];
new
bool:g_bUsed[33];
//////////////////////////////////////////////////////Init
public plugin_init() {
//////////////////////////////////////////////////////
register_plugin(PLUGIN, VERSION, AUTHOR);
//////////////////////////////////////////////////////Clcmd
register_clcmd("say", "hook_say");
register_clcmd("say_team", "hook_say");
//////////////////////////////////////////////////////Events
register_event("CurWeapon", "CurWeapon", "be", "1=1");
register_event("CurWeapon", "CurWeaponn", "be", "1=1");
//Ham
RegisterHam(Ham_Spawn, "player", "PlayerSpawn", 1);
RegisterHam(Ham_TakeDamage, "player", "PlayerDamage");
//Fw
register_forward(FM_EmitSound, "sound_emit");
//Concmd
register_concmd("+drop","Drop");
register_concmd("-drop","Drop");
//////////////////////////////////////////////////////
}
//////////////////////////////////////////////////////Precache
public plugin_precache()
{
//////////////////////////////////////////////////////HUD
g_bHud = CreateHudSyncObj();
//////////////////////////////////////////////////////Cvar 1
furien_on = register_cvar("furien_vip_on", "1"); //1 =On , 2 = Off
furien_bind = register_cvar("furien_bind", "1"); //1 =On , 2 = Off
furien_message_connect = register_cvar("furien_message_connect", "1"); //1 =On , 2 = Off
furien_scoreboard = register_cvar("furien_scoreboard", "1"); //1 =On , 2 = Off
//////////////////////////////////////////////////////Cvar 2
furien_give_stuff = register_cvar("furien_give_stuff", "1"); //1 =On , 2 = Off
furien_give_ultimate = register_cvar("furien_give_ultimate", "1"); //1 =On , 2 = Off
//////////////////////////////////////////////////////Cvar 3
furien_health_on = register_cvar("furien_regeneration_on", "1"); //1 =On , 2 = Off
furien_health = register_cvar("furien_health", "1"); //1 = 1hp , 2 = 2hp / per second, etc.
furien_health_max = register_cvar("furien_health_max", "100"); //100 = 100 hp, max n
//////////////////////////////////////////////////////Models
precache_model(Golden_Ak_V);
precache_model(Golden_Ak_P);
precache_model(Golden_Deagle_V);
precache_model(Golden_Deagle_P);
precache_model(Golden_M4a1_V);
precache_model(Golden_M4a1_P);
precache_model(Onion_V);
precache_model(Knife_P);
//////////////////////////////////////////////////////Sounds
precache_sound("weapons/cbar_hitbod2.wav");
precache_sound("weapons/cbar_hitbod1.wav");
precache_sound("weapons/bullet_hit1.wav");
precache_sound("weapons/bullet_hit2.wav");
//////////////////////////////////////////////////////Texture
Drop_Texture = precache_model("sprites/lgtning.spr");
}
//////////////////////////////////////////////////////Drop Spr
public Drop(id)
{
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(!g_bDrop[id])
{
ColorChat(id, GREEN,"%s^x03 %s^x01 nu ai acces la^x03 drop weapons.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
else
{
if(g_bCoolDown[id])
{
ColorChat(id, GREEN,"%s^x03 CoolDown ON!^x01", szPrefix);
return PLUGIN_HANDLED;
}
else
{
g_bCoolDown[id] = true;
Drop_Now(id);
}
}
return PLUGIN_HANDLED;
}
public UnDropFalse(id)
{
g_bCoolDown[id] = false;
remove_task(id);
ColorChat(id, GREEN,"%s^x03 CoolDown Off!^x01", szPrefix);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Spawn
public PlayerSpawn(id)
{
new szFlags = get_user_flags(id);
new szScore = get_pcvar_num(furien_scoreboard);
new szWeapon = get_user_weapon(id);
if(szFlags & VIP_LEVEL)
{
if(!szScore)
return PLUGIN_HANDLED;
else
{
if (get_user_team(id) == 1)
if(szWeapon == CSW_C4)
set_task( 0.6, "Bomb", id + 6910 );
set_task( 0.5, "Scoare_Board", id + 6910 );
}
g_bGoldenAk[id] = false;
g_bGoldenM4a1[id] = false;
g_bGoldenDeagle[id] = false;
g_bOnion[id] = false;
g_bLifeSteal[id] = false;
g_bDrop[id] = false;
g_bUsed[id] = false;
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Take Damage
public PlayerDamage(iVictim, iInflictor, iAttacker, Float:fDamage, iDamageBits )
{
if(!is_user_alive(iAttacker)
|| is_user_bot(iAttacker))
return HAM_IGNORED;
if(iInflictor == iAttacker
&& get_user_weapon(iAttacker) == CSW_KNIFE
&& cs_get_user_team(iAttacker) == CS_TEAM_T)
{
if(g_bLifeSteal[iVictim])
{
message_begin(MSG_ONE_UNRELIABLE, get_user_msgid("ScreenFade"), {0, 0, 0}, iVictim);
write_short(3 << 12);
write_short(3 << 12);
write_short(0x0000);
write_byte(255);
write_byte(0);
write_byte(0);
write_byte(127);
message_end();
}
else if(g_bLifeSteal[iAttacker])
set_user_health(iAttacker, get_user_health(iAttacker) + 10);
if(g_bOnion[iAttacker])
SetHamParamFloat( 4, fDamage+40);
return HAM_HANDLED;
}
if(iInflictor == iAttacker
&& cs_get_user_team(iAttacker) == CS_TEAM_CT)
{
if(get_user_weapon(iAttacker) == CSW_DEAGLE && g_bGoldenDeagle[iAttacker])
SetHamParamFloat( 4, (fDamage+75)-fDamage);
if((get_user_weapon(iAttacker) == CSW_AK47
|| get_user_weapon(iAttacker) == CSW_M4A1)
&& (g_bGoldenM4a1[iAttacker] || g_bGoldenAk[iAttacker]))
SetHamParamFloat( 4, (fDamage+130)-fDamage);
return HAM_HANDLED;
}
return HAM_HANDLED;
}
//////////////////////////////////////////////////////Vip ScoreBoard
public Scoare_Board(TaskID, id)
{
new szFlags = get_user_flags(id);
new id = TaskID - 6910;
if(szFlags & VIP_LEVEL)
{
message_begin(MSG_ALL, get_user_msgid("ScoreAttrib"));
write_byte(id);
write_byte(4);
message_end();
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Putinserver
public client_putinserver(id)
{
new szBind = get_pcvar_num(furien_bind);
new szMessage = get_pcvar_num(furien_message_connect);
if(!szBind)
return PLUGIN_HANDLED;
else set_task(1.0, "set_bind", id);
if(!szMessage)
return PLUGIN_HANDLED;
else set_task(1.5, "vip_connected", id);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Vip Connected
public vip_connected(id)
{
new szFlags = get_user_flags(id);
new szName[32],szHost[64];
get_user_name(id, szName, charsmax(szName));
get_cvar_string("hostname", szHost ,charsmax(szHost));
if(szFlags & VIP_LEVEL)
{
ColorChat(0, GREEN,"%s^x03 %s^x01 a intrat pe^x03 %s^x01", szPrefix, szName, szHost);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Disconnect
public client_disconnect(id)
{
new szMessage = get_pcvar_num(furien_message_connect);
if(!szMessage)
return PLUGIN_HANDLED;
else set_task(1.5, "vip_disconnected", id);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Vip Disconnected
public vip_disconnected(id)
{
new szFlags = get_user_flags(id);
new szName[32],szHost[64];
get_user_name(id, szName, charsmax(szName));
get_cvar_string("hostname", szHost ,charsmax(szHost));
if(szFlags & VIP_LEVEL)
{
ColorChat(0, GREEN,"%s^x03 %s^x01 a iesit de pe^x03 %s^x01", szPrefix, szName, szHost);
return PLUGIN_HANDLED;
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Set Bind
public set_bind(id)
{
new szFlags = get_user_flags(id);
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(szFlags & VIP_LEVEL)
{
client_cmd(id, "bind x say /furienvip");
ColorChat(id, GREEN,"%s^x03 %s^x01 esti vip^x03 apasa x pentru meniu.^x01", szPrefix, szName);
}
else client_cmd(id, "unbind x");
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Hook Say
public hook_say(id) {
static Arg[192];
read_args(Arg, sizeof(Arg) - 1);
remove_quotes(Arg);
if(equal(Arg, "/vmenu", 5) || equal(Arg,"/furienvip",10)) {
replace(Arg, sizeof(Arg) - 1, "/", "");
set_task(0.1,"Furien_Menu",id);
}
if(equal(Arg, "/vip", 5) || equal(Arg,"/vipinfo",10)) {
replace(Arg, sizeof(Arg) - 1, "/", "");
show_motd(id,"/addons/amxmodx/data/lang/vip.html");
}
return PLUGIN_CONTINUE;
}
//////////////////////////////////////////////////////Furien Menu
public Furien_Menu(id)
{
new szFlags = get_user_flags(id);
new szFurienOn = get_pcvar_num(furien_on);
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(!is_user_alive(id) || is_user_bot(id))
{
ColorChat(id, GREEN,"%s^x03 %s^x01 poti folosi comanda doar cand esti^x03 viu.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
if(!szFurienOn){
ColorChat(id, GREEN,"%s^x03 %s^x01 pluginul VIP este^x03 dezactivat.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
else
{
if(szFlags & VIP_LEVEL)
{
if(g_bUsed[id])
{
ColorChat(id, GREEN,"%s^x03 %s^x01 tocmai ai folosit^x03 furien menu.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
else
{
new szVmenu = menu_create("\rVIP \dMenu:^n", "Show_Furien_Menu");
menu_additem(szVmenu, " \dStuff", "1", 0);
menu_additem(szVmenu, " \dUltimate", "2", 0);
menu_setprop(szVmenu, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szVmenu, 0);
}
}
else
{
ColorChat(id, GREEN,"%s^x03 %s^x01 nu esti^x03 vip.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Furien Sub Menu
public Show_Furien_Menu(id, szVmenu, item)
{
if( item == MENU_EXIT )
{
menu_destroy(szVmenu);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new access, callback;
menu_item_getinfo(szVmenu, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1: GiveStuff(id);
case 2: GiveUltimate(id);
}
menu_destroy(szVmenu);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Give Stuff..
public GiveStuff(id)
{
new szStuffOn = get_pcvar_num(furien_give_stuff);
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(!szStuffOn){
ColorChat(id, GREEN,"%s^x03 %s^x01 acest meniu este^x03 dezactivat.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
else
{
new szStuff = menu_create("\rVIP \dMenu:^n", "Show_Stuff_Menu");
menu_additem(szStuff, " \r255 \dAp+Hp", "1", 0);
menu_additem(szStuff, " \rNade \dPack", "3", 0);
menu_setprop(szStuff, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szStuff, 0);
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Give Stuff SubMenu
public Show_Stuff_Menu(id, szStuff, item)
{
if( item == MENU_EXIT )
{
menu_destroy(szStuff);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new szName[32];
get_user_name(id, szName, charsmax(szName));
new access, callback;
menu_item_getinfo(szStuff, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
g_bUsed[id] = true;
set_user_health(id, 255);
set_user_armor(id, 255);
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit +155^x03 viata si armura.^x01", szPrefix, szName);
}
case 2:
{
g_bUsed[id] = true;
set_user_godmode(id, 1);
set_task(30.0, "Set_GodMode", id);
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit godmode pentru^x03 30^x01 secunde.^x03", szPrefix, szName);
}
case 3:
{
g_bUsed[id] = true;
give_item(id, "weapon_hegrenade");
give_item(id, "weapon_flashbang");
give_item(id, "weapon_smokegrenade");
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 nade pack.^x01", szPrefix, szName);
}
}
menu_destroy(szStuff);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Set GodMode..
public Set_GodMode(id)
{
ColorChat(id, GREEN,"%s^x03 nu mai ai^x03 godmode.^x01", szPrefix);
set_user_godmode(id, 0);
remove_task(id);
}
//////////////////////////////////////////////////////Give Ultimate...
public GiveUltimate(id)
{
new szUltimateOn = get_pcvar_num(furien_give_ultimate);
new szName[32];
get_user_name(id, szName, charsmax(szName));
if(!szUltimateOn){
ColorChat(id, GREEN,"%s^x03 %s^x01 acest meniu este^x03 dezactivat.^x01", szPrefix, szName);
return PLUGIN_HANDLED;
}
else
{
static CsTeams:szTeam;
szTeam = cs_get_user_team(id);
switch(szTeam)
{
case CS_TEAM_CT:
{
new szUlti = menu_create("\rUltimate \dMenu:^n", "Show_Ultimate_AntiFurien_Menu");
menu_additem(szUlti, " \dUltimate Menu", "1", 0);
menu_setprop(szUlti, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szUlti, 0);
}
case CS_TEAM_T:
{
new szUlti1 = menu_create("\rUltimate \dMenu:^n", "Show_Ultimate_Furien_Menu");
menu_additem(szUlti1, " \rMaSteR \d Blade", "1", 0);
menu_additem(szUlti1, " \rLife \dSteal", "2", 0);
menu_additem(szUlti1, " \rDrop \dWeapons", "3", 0);
menu_setprop(szUlti1, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szUlti1, 0);
}
}
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Anti-Furien SubMenu
public Show_Ultimate_Furien_Menu(id, szUlti1, item)
{
if( item == MENU_EXIT )
{
menu_destroy(szUlti1);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new szName[32];
get_user_name(id, szName, charsmax(szName));
new access, callback;
menu_item_getinfo(szUlti1, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
new szHealth = get_user_health(id);
new szArmor = get_user_armor(id);
give_item(id, "weapon_knife");
set_user_health(id, szHealth + 130);
set_user_armor(id, szArmor + 100);
set_pev(id, pev_viewmodel2, Onion_V);
set_pev(id, pev_weaponmodel2, Knife_P);
g_bOnion[id] = true;
g_bUsed[id] = true;
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 MaSteR Blade.^x01", szPrefix, szName);
}
case 2:
{
give_item(id, "weapon_knife");
g_bLifeSteal[id] = true;
g_bUsed[id] = true;
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 life steal.^x01", szPrefix, szName);
}
case 3:
{
give_item(id, "weapon_knife");
g_bDrop[id] = true;
g_bUsed[id] = true;
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 drop enemy weapons.^x01", szPrefix, szName);
}
}
menu_destroy(szUlti1);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Furien SubMenu
public Show_Ultimate_AntiFurien_Menu(id, szUlti, item)
{
if( item == MENU_EXIT )
{
menu_destroy(szUlti);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new szName[32];
get_user_name(id, szName, charsmax(szName));
new access, callback;
menu_item_getinfo(szUlti, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1: GoldMenu(id);
}
menu_destroy(szUlti);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Gold Menu
public GoldMenu(id)
{
new szGold = menu_create("\rGold \dMenu:^n", "Show_Sub_GoldMenu");
menu_additem(szGold, "\yDarK M4A1 \d\r& \d Janus", "1", 0);
menu_additem(szGold, "\yAk47 Paladin \d\r& \dJanus", "2", 0);
menu_setprop(szGold, MPROP_EXIT, MEXIT_ALL);
menu_display(id, szGold, 0);
}
//////////////////////////////////////////////////////Gold SubMenu
public Show_Sub_GoldMenu(id, szGold, item)
{
if( item == MENU_EXIT )
{
menu_destroy(szGold);
return PLUGIN_HANDLED;
}
new data[6], iName[64];
new szName[32];
get_user_name(id, szName, charsmax(szName));
new access, callback;
menu_item_getinfo(szGold, item, access, data,5, iName, 63, callback);
new key = str_to_num(data);
switch(key)
{
case 1:
{
give_item(id, "weapon_m4a1");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 160);
cs_set_user_bpammo(id, CSW_DEAGLE, 100);
g_bGoldenM4a1[id] = true;
g_bGoldenDeagle[id] = true;
g_bUsed[id] = true;
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 Dark m4a1 + Janus.^x01", szPrefix, szName);
}
case 2:
{
give_item(id, "weapon_ak47");
give_item(id, "weapon_deagle");
cs_set_user_bpammo(id, CSW_AK47, 1260);
cs_set_user_bpammo(id, CSW_DEAGLE, 100);
g_bGoldenAk[id] = true;
g_bGoldenDeagle[id] = true;
g_bUsed[id] = true;
ColorChat(id, GREEN,"%s^x03 %s^x01 ai primit^x03 Ak47 Paladin + Janus.^x01", szPrefix, szName);
}
}
menu_destroy(szGold);
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Current Weapon
public CurWeapon(id) {
new szWeapon = get_user_weapon(id);
new szHealth = get_user_health(id);
new szFlags = get_user_flags(id);
static CsTeams:szTeam;
szTeam = cs_get_user_team(id);
if(szFlags & VIP_LEVEL)
{
if(szWeapon == CSW_KNIFE)
{
if(szHealth < 25)
set_task(5.0, "Regeneration_HP",id, _, _, "b");
if(szTeam == CS_TEAM_CT)
{
set_pev(id, pev_maxspeed, 425.0);
set_user_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, 68);
}
}
else
{
if(szTeam == CS_TEAM_CT)
{
set_pev(id, pev_maxspeed, 250.0);
set_user_rendering(id, _, 0, 0, 0, _, 0);
}
remove_task(id);
}
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Current Weaponn
public CurWeaponn(id) {
new szWeapon = get_user_weapon(id);
if(szWeapon == CSW_KNIFE)
{
if(szWeapon == CSW_KNIFE && g_bOnion[id] == true)
{
set_pev(id, pev_viewmodel2, Onion_V);
set_pev(id, pev_weaponmodel2, Knife_P);
}
}
if(szWeapon == CSW_AK47)
{
if(szWeapon == CSW_AK47 && g_bGoldenAk[id] == true)
{
set_pev(id, pev_viewmodel2, Golden_Ak_V);
set_pev(id, pev_weaponmodel2, Golden_Ak_P);
}
}
if(szWeapon == CSW_M4A1)
{
if(szWeapon == CSW_M4A1 && g_bGoldenM4a1[id] == true)
{
set_pev(id, pev_viewmodel2, Golden_M4a1_V);
set_pev(id, pev_weaponmodel2, Golden_M4a1_P);
}
}
if(szWeapon == CSW_DEAGLE)
{
if(szWeapon == CSW_DEAGLE && g_bGoldenDeagle[id] == true)
{
set_pev(id, pev_viewmodel2, Golden_Deagle_V);
set_pev(id, pev_weaponmodel2, Golden_Deagle_P);
}
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Regeneration
public Regeneration_HP(id) {
if(!is_user_alive(id) || is_user_bot(id))
return PLUGIN_HANDLED;
new szHP_On = get_pcvar_num(furien_health_on);
new szAddHP = get_pcvar_num(furien_health);
new szHPMax = get_pcvar_num(furien_health_max);
new szHP = get_user_health(id);
new iRandom = random_num(0,255);
if(!szHP_On)
return PLUGIN_HANDLED;
else
{
if(szHP >= szHPMax)
{
emit_sound(id,CHAN_VOICE, "fvox/medical_repaired.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
remove_task(id);
}
else
{
set_user_health(id, szHP + szAddHP);
set_hudmessage(iRandom, iRandom, iRandom, -1.0, 0.25, 1, 1.0, 2.0, 0.1, 0.1, 4);
ShowSyncHudMsg(id, g_bHud, "%s^nViata ta se incarca pana la %d !", szPrefix, szHPMax);
message_begin(MSG_ONE, get_user_msgid("ScreenFade"), {0,0,0}, id);
write_short(1<<10);
write_short(1<<10);
write_short(0x0000);
write_byte(0);
write_byte(191);
write_byte(255);
write_byte(75);
message_end();
}
}
return PLUGIN_HANDLED;
}
//////////////////////////////////////////////////////Sound Emit
public sound_emit(id, channel, sample[])
{
if(!is_user_alive(id) || is_user_bot(id))
return FMRES_SUPERCEDE;
if(g_bOnion[id] && equal(sample, "weapons/knife_", 14))
{
switch(sample[17])
{
case('b'):
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod2.wav", 1.0, ATTN_NORM, 0, PITCH_NORM);
}
case('w'):
{
emit_sound(id, CHAN_WEAPON, "weapons/cbar_hitbod1.wav", 1.0, ATTN_NORM, 0, PITCH_LOW);
}
case('1', '2'):
{
emit_sound(id, CHAN_WEAPON, "weapons/bullet_hit2.wav", random_float(0.5, 1.0), ATTN_NORM, 0, PITCH_NORM);
}
}
return FMRES_SUPERCEDE;
}
return FMRES_IGNORED;
}
//////////////////////////////////////////////////////Drop
public Drop_Now(id)
{
new szTarget, szBody;
new szNameId[32],szNameTrg[32];
get_user_name(id, szNameId, charsmax(szNameId));
get_user_name(szTarget, szNameTrg, charsmax(szNameTrg));
static Float:szStart[3];
static Float:szAim[3];
pev(id, pev_origin, szStart);
fm_get_aim_origin(id, szAim);
szStart[2] += 16.0; // raise
szAim[2] += 16.0; // raise
get_user_aiming ( id, szTarget, szBody, 5000 );
if(!is_user_alive(szTarget)
|| is_user_bot(szTarget) || get_user_team(szTarget) == 1)
return PLUGIN_HANDLED;
else
{
set_task(10.0, "UnDropFalse", id);
ColorChat(0, GREEN,"%s^x03 %s^x01 a primit drop weapons de la^x03 %s^x01", szPrefix, szNameTrg, szNameId);
drop(szTarget);
}
message_begin(MSG_BROADCAST,SVC_TEMPENTITY);
write_byte(0);
engfunc(EngFunc_WriteCoord,szStart[0]);
engfunc(EngFunc_WriteCoord,szStart[1]);
engfunc(EngFunc_WriteCoord,szStart[2]);
engfunc(EngFunc_WriteCoord,szAim[0]);
engfunc(EngFunc_WriteCoord,szAim[1]);
engfunc(EngFunc_WriteCoord,szAim[2]);
write_short(Drop_Texture);
write_byte(0);
write_byte(30);
write_byte(20);
write_byte(50);
write_byte(50);
write_byte(100);
write_byte(100);
write_byte(100);
write_byte(100);
write_byte(50);
message_end();
return PLUGIN_HANDLED;
}
stock drop(id)
{
new szWeapons[32], iNum;
get_user_weapons(id, szWeapons, iNum);
for (new i = 0; i < iNum; i++) {
if (WEAPONS & (1<<szWeapons[i]))
{
static szWname[32];
get_weaponname(szWeapons[i], szWname, charsmax(szWeapons));
engclient_cmd(id, "drop", szWname);
}
}
}
stock fm_get_aim_origin(index, Float:origin[3])
{
new Float:szStart[3], Float:szView_Ofs[3];
pev(index, pev_origin, szStart);
pev(index, pev_view_ofs, szView_Ofs);
xs_vec_add(szStart, szView_Ofs, szStart);
new Float:szDest[3];
pev(index, pev_v_angle, szDest);
engfunc(EngFunc_MakeVectors, szDest);
global_get(glb_v_forward, szDest);
xs_vec_mul_scalar(szDest, 9999.0, szDest);
xs_vec_add(szStart, szDest, szDest);
engfunc(EngFunc_TraceLine, szStart, szDest, 0, index, 0);
get_tr2(0, TR_vecEndPos, origin);
return 1;
} [spoiler]
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 12-12-2024, 22:59:53
Copyright info
Based on phpBB
ro
/
com
B
Login
I forgot my password
World of Warcraft
Login for more...
Download WoW 7.3.5
Misc
eSports
Achievements
Buy reputation with votes
Reputation trades
Forum rules
Ban list
Members list
User guide (FAQ)
World of Warcraft
View details