Даване на нещо на играч с команда от гонзолата КАК ?
-
User12
Извън линия - Потребител
- Мнения: 321
- Регистриран на: 25 Яну 2018, 22:39
- Местоположение: Сливен
- Се отблагодари: 40 пъти
- Получена благодарност: 17 пъти
- Обратна връзка:
Даване на нещо на играч с команда от гонзолата КАК ?
Здравейте , искам да дам на някой играч с команда от гонзолата нещо , примерно кръв или броня какъв код трябва да ползвам
примерно искам да формулирам така amx_giveplayerhp "nick" "kolichestvo" какво трябва да сложа в кода за да се осъществи това
примерно искам да формулирам така amx_giveplayerhp "nick" "kolichestvo" какво трябва да сложа в кода за да се осъществи това
-
wrath
Извън линия - Потребител
- Мнения: 167
- Регистриран на: 21 Яну 2018, 10:30
- Местоположение: /changerace
- Обратна връзка:
Даване на нещо на играч с команда от гонзолата КАК ?
Код за потвърждение: Избери целия код
#include < amxmodx >
#include < amxmisc >
#include < fun >
new g_iMsgId_Health;
public plugin_init( )
{
register_plugin( "AMX Health", "0.1", "Exolent" );
register_concmd( "amx_givehp", "CmdGive", ADMIN_SLAY, "<nick, #userid, authid> <hp>" );
register_concmd( "amx_takehp", "CmdTake", ADMIN_SLAY, "<nick, #userid, authid> <hp>" );
register_concmd( "amx_sethp", "CmdSet", ADMIN_SLAY, "<nick, #userid, authid> <hp>" );
g_iMsgId_Health = get_user_msgid( "Health" );
}
public CmdGive( client, iLevel, iCId )
{
if( !cmd_access( client, iLevel, iCId, 3 ) )
{
return PLUGIN_HANDLED;
}
static szArg[ 35 ];
read_argv( 1, szArg, 34 );
new iPlayer = cmd_target( client, szArg, 13 );
if( !iPlayer )
{
return PLUGIN_HANDLED;
}
read_argv( 2, szArg, 5 );
new iAmount = str_to_num( szArg );
if( iAmount <= 0 )
{
console_print( client, "The hp amount must be greater than 0!" );
return PLUGIN_HANDLED;
}
SetHealth( iPlayer, get_user_health( iPlayer ) + iAmount );
static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ];
get_user_name( client, szNames[ 0 ], 31 );
get_user_authid( client, szAuthids[ 0 ], 34 );
get_user_name( iPlayer, szNames[ 1 ], 31 );
get_user_authid( iPlayer, szAuthids[ 1 ], 34 );
show_activity( client, szNames[ 0 ], "gave %i health to %s.", iAmount, szNames[ 1 ] );
log_amx( "%s<%s> gave %i health to %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] );
return PLUGIN_HANDLED;
}
public CmdTake( client, iLevel, iCId )
{
if( !cmd_access( client, iLevel, iCId, 3 ) )
{
return PLUGIN_HANDLED;
}
static szArg[ 35 ];
read_argv( 1, szArg, 34 );
new iPlayer = cmd_target( client, szArg, 13 );
if( !iPlayer )
{
return PLUGIN_HANDLED;
}
read_argv( 2, szArg, 5 );
new iAmount = str_to_num( szArg );
if( iAmount <= 0 )
{
console_print( client, "The hp amount must be greater than 0!" );
return PLUGIN_HANDLED;
}
SetHealth( iPlayer, get_user_health( iPlayer ) - iAmount );
static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ];
get_user_name( client, szNames[ 0 ], 31 );
get_user_authid( client, szAuthids[ 0 ], 34 );
get_user_name( iPlayer, szNames[ 1 ], 31 );
get_user_authid( iPlayer, szAuthids[ 1 ], 34 );
show_activity( client, szNames[ 0 ], "took %i health from %s.", iAmount, szNames[ 1 ] );
log_amx( "%s<%s> took %i health from %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] );
return PLUGIN_HANDLED;
}
public CmdSet( client, iLevel, iCId )
{
if( !cmd_access( client, iLevel, iCId, 3 ) )
{
return PLUGIN_HANDLED;
}
static szArg[ 35 ];
read_argv( 1, szArg, 34 );
new iPlayer = cmd_target( client, szArg, 13 );
if( !iPlayer )
{
return PLUGIN_HANDLED;
}
read_argv( 2, szArg, 5 );
new iAmount = str_to_num( szArg );
if( iAmount <= 0 )
{
console_print( client, "The hp amount must be greater than 0!" );
return PLUGIN_HANDLED;
}
SetHealth( iPlayer, iAmount );
static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ];
get_user_name( client, szNames[ 0 ], 31 );
get_user_authid( client, szAuthids[ 0 ], 34 );
get_user_name( iPlayer, szNames[ 1 ], 31 );
get_user_authid( iPlayer, szAuthids[ 1 ], 34 );
show_activity( client, szNames[ 0 ], "set %i health on %s.", iAmount, szNames[ 1 ] );
log_amx( "%s<%s> set %i health on %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] );
return PLUGIN_HANDLED;
}
SetHealth( client, iHealth )
{
if( iHealth <= 0 )
{
user_kill( client );
}
else
{
set_user_health( client, iHealth );
emessage_begin( MSG_ONE_UNRELIABLE, g_iMsgId_Health, _, client );
ewrite_byte( iHealth );
emessage_end( );
}
}
Даване на нещо на играч с команда от гонзолата КАК ?
Той изобщо не търсеше плъгин или нещо от сорта, а търсеше помощ за как да го направи той самият -.-wrath написа: ↑04 Мар 2018, 10:14Код за потвърждение: Избери целия код
#include < amxmodx > #include < amxmisc > #include < fun > new g_iMsgId_Health; public plugin_init( ) { register_plugin( "AMX Health", "0.1", "Exolent" ); register_concmd( "amx_givehp", "CmdGive", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); register_concmd( "amx_takehp", "CmdTake", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); register_concmd( "amx_sethp", "CmdSet", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); g_iMsgId_Health = get_user_msgid( "Health" ); } public CmdGive( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, get_user_health( iPlayer ) + iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "gave %i health to %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> gave %i health to %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } public CmdTake( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, get_user_health( iPlayer ) - iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "took %i health from %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> took %i health from %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } public CmdSet( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "set %i health on %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> set %i health on %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } SetHealth( client, iHealth ) { if( iHealth <= 0 ) { user_kill( client ); } else { set_user_health( client, iHealth ); emessage_begin( MSG_ONE_UNRELIABLE, g_iMsgId_Health, _, client ); ewrite_byte( iHealth ); emessage_end( ); } }
The Best Deathrun Server: 79.124.49.91:27019
The Best Respawn Server: 79.124.49.88:27021
The Best Respawn Server: 79.124.49.88:27021
-
TheRedShoko
Извън линия - Модератор
- Мнения: 1016
- Регистриран на: 06 Окт 2016, 07:42
- Местоположение: Бургас
- Се отблагодари: 5 пъти
- Получена благодарност: 84 пъти
Даване на нещо на играч с команда от гонзолата КАК ?
Може да види начина на работа на плъгина. "Гонзола"? Горгонзола mby? Много го обичам това сирене...
-
User12
Извън линия - Потребител
- Мнения: 321
- Регистриран на: 25 Яну 2018, 22:39
- Местоположение: Сливен
- Се отблагодари: 40 пъти
- Получена благодарност: 17 пъти
- Обратна връзка:
Даване на нещо на играч с команда от гонзолата КАК ?
Ще го пробвам това , ако нещо не се справя ще пиша пак в темата
wrath написа: ↑04 Мар 2018, 10:14Код за потвърждение: Избери целия код
#include < amxmodx > #include < amxmisc > #include < fun > new g_iMsgId_Health; public plugin_init( ) { register_plugin( "AMX Health", "0.1", "Exolent" ); register_concmd( "amx_givehp", "CmdGive", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); register_concmd( "amx_takehp", "CmdTake", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); register_concmd( "amx_sethp", "CmdSet", ADMIN_SLAY, "<nick, #userid, authid> <hp>" ); g_iMsgId_Health = get_user_msgid( "Health" ); } public CmdGive( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, get_user_health( iPlayer ) + iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "gave %i health to %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> gave %i health to %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } public CmdTake( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, get_user_health( iPlayer ) - iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "took %i health from %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> took %i health from %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } public CmdSet( client, iLevel, iCId ) { if( !cmd_access( client, iLevel, iCId, 3 ) ) { return PLUGIN_HANDLED; } static szArg[ 35 ]; read_argv( 1, szArg, 34 ); new iPlayer = cmd_target( client, szArg, 13 ); if( !iPlayer ) { return PLUGIN_HANDLED; } read_argv( 2, szArg, 5 ); new iAmount = str_to_num( szArg ); if( iAmount <= 0 ) { console_print( client, "The hp amount must be greater than 0!" ); return PLUGIN_HANDLED; } SetHealth( iPlayer, iAmount ); static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ]; get_user_name( client, szNames[ 0 ], 31 ); get_user_authid( client, szAuthids[ 0 ], 34 ); get_user_name( iPlayer, szNames[ 1 ], 31 ); get_user_authid( iPlayer, szAuthids[ 1 ], 34 ); show_activity( client, szNames[ 0 ], "set %i health on %s.", iAmount, szNames[ 1 ] ); log_amx( "%s<%s> set %i health on %s<%s>", szNames[ 0 ], szAuthids[ 0 ], iAmount, szNames[ 1 ], szAuthids[ 1 ] ); return PLUGIN_HANDLED; } SetHealth( client, iHealth ) { if( iHealth <= 0 ) { user_kill( client ); } else { set_user_health( client, iHealth ); emessage_begin( MSG_ONE_UNRELIABLE, g_iMsgId_Health, _, client ); ewrite_byte( iHealth ); emessage_end( ); } }
-
User12
Извън линия - Потребител
- Мнения: 321
- Регистриран на: 25 Яну 2018, 22:39
- Местоположение: Сливен
- Се отблагодари: 40 пъти
- Получена благодарност: 17 пъти
- Обратна връзка:
Даване на нещо на играч с команда от гонзолата КАК ?
Не можах да го разбера този код : направих го така го само с copy paste само размених имената на функциите но не се получава . Посъветвайте ме как , има нещо което пропускам или не правя както трябва все пак тъкмо започвам да се уча и експерементирам с някой неща
Код за потвърждение: Избери целия код
#include <amxmodx>
#include <amxmisc>
#define SOUND_FILE "invisible_cloak/invisiblecloak.wav"
#define SOUND_FILE2 "invisible_cloak/cloakenergy.wav"
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#include <cstrike>
#include <zombieplague>
#include <cromchat>
#define PLUGIN "[ZP] Extra Item : Invisible"
#define VERSION "1.7.0"
#define AUTHOR "Fry! and Logitechz23"
#define ROUND_LIMIT 1
new g_item_name[] = "MAX Invisible (\rOne Round\w)"
new g_itemid_invisible, invisible_amount, invisible_cost, invisible_long, invisible_long2
new bool:g_hasInvisible[33]
new g_iRoundsLeft[ 33 ], g_iUses[33]
new const g_iLimit = 2
new g_iTimer[33]
#define TASK 444555
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_cvar("zp_extra_invisible",VERSION,FCVAR_SERVER|FCVAR_EXTDLL|FCVAR_UNLOGGED|FCVAR_SPONLY)
invisible_amount = register_cvar("zp_max_invisible_amount", "0")
invisible_cost = register_cvar("zp_max_invisible_cost", "35")
invisible_long = register_cvar("zp_max_invisible_long", "10.0")
invisible_long2 = register_cvar("zp_max_invisible_long2", "200.0")
CC_SetPrefix("&x05[&x04EliteServ.InFo&x05]")
register_concmd("amx_cloak", "Admin_invisible", ADMIN_BAN)
register_concmd("amx_removecloak", "Invisible_stop", ADMIN_BAN)
register_concmd("amx_givecloak", "GiveCloak", ADMIN_BAN)
register_event("DeathMsg", "Death", "a")
register_event("HLTV", "event_round_start", "a", "1=0", "2=0")
register_logevent("OnRoundStart", 2, "1=Round_Start");
RegisterHam(Ham_Spawn, "player", "OnPlayerSpawn", 1)
g_itemid_invisible = zp_register_extra_item(g_item_name, get_pcvar_num(invisible_cost), ZP_TEAM_HUMAN & ZP_TEAM_ZOMBIE)
}
public plugin_precache()
{
precache_sound(SOUND_FILE)
precache_sound(SOUND_FILE2)
}
public GiveCloak( client, iLevel, iCId )
{
if( !cmd_access( client, iLevel, iCId, 3 ) )
{
return PLUGIN_HANDLED;
}
static szArg[ 35 ];
read_argv( 1, szArg, 34 );
new iPlayer = cmd_target( client, szArg, 13 );
if( !iPlayer )
{
return PLUGIN_HANDLED;
}
read_argv( 2, szArg, 5 );
new invisible_long = str_to_num( szArg );
if( invisible_long <= -1 )
{
console_print( client, "The hp amount must be greater than 0!" );
return PLUGIN_HANDLED;
}
g_hasInvisible[iPlayer] = true
//SetHealth( iPlayer, get_user_health( iPlayer ) + iAmount );
fm_set_rendering(iPlayer, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(invisible_amount) + invisible_long)
static szNames[ 2 ][ 32 ], szAuthids[ 2 ][ 35 ];
get_user_name( client, szNames[ 0 ], 31 );
get_user_authid( client, szAuthids[ 0 ], 34 );
get_user_name( iPlayer, szNames[ 1 ], 31 );
get_user_authid( iPlayer, szAuthids[ 1 ], 34 );
show_activity( client, szNames[ 0 ], "gave %i invisible to %s", invisible_long, szNames[ 1 ]);
log_amx( "%s<%s> gave %i invisible to %s<%s>", szNames[ 0 ], szAuthids[ 0 ], invisible_long, szNames[ 1 ], szAuthids[ 1 ] );
return PLUGIN_HANDLED;
}
public Invisible_stop(id, level, cid)
{
remove_task(id+TASK)
g_hasInvisible[id] = false
fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
CC_LogMessage(id, _, " &x06Cloak Mode &x01has been &x04Disabled !")
return PLUGIN_HANDLED
}
public Admin_invisible(id)
{
if (!is_user_alive(id))
{
g_hasInvisible[id] = false
CC_SendMessage(id, "&x04ATTENTION &x01You should be allive to use that &x04Abillity !!")
return PLUGIN_HANDLED
}
if (is_user_alive(id))
{
g_iTimer[id] = get_pcvar_num(invisible_long2)
set_task(1.0, "Timer", id+TASK, .flags = "b")
g_hasInvisible[id] = true
fm_set_rendering(id, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(invisible_amount))
set_task(get_pcvar_float(invisible_long2), "invisible_over", id)
CC_LogMessage(id, _, "&x03You Get &x04CLOAK Mode &x03Good luck &x04***")
client_cmd(id, "spk ^"%s^"", SOUND_FILE)
}
return PLUGIN_CONTINUE
}
public Timer(id)
{
id -= TASK
set_hudmessage(0, 0, 255, -1.0, 0.28, 2, 0.1, 1.0, 0.01, 0.0, -1)
show_hudmessage(id, "Remaining %i seconds !", g_iTimer[id])
if(--g_iTimer[id] == 0)
remove_task(id+TASK)
if (!is_user_alive(id))
{
remove_task(id+TASK)
}
}
public OnRoundStart()
{
new iPlayers[32], iPnum
get_players(iPlayers, iPnum)
for(new i, iPlayer; i < iPnum; i++)
{
iPlayer = iPlayers[i]
if(g_iRoundsLeft[iPlayer] > 0)
g_iRoundsLeft[iPlayer]--
}
}
public client_connect(id)
{
g_hasInvisible[id] = false
fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
g_iRoundsLeft[id] = 0
}
public client_disconnect(id)
{
g_hasInvisible[id] = false
fm_set_rendering(id, kRenderFxNone, 0,0,0,kRenderNormal, 255)
}
public Death()
{
g_hasInvisible[read_data(2)] = false
}
public event_round_start()
{
for (new i = 1; i <= 32; i++)
{
g_hasInvisible[i] = false
if (is_user_alive(i))
{
set_pev(i, pev_renderfx, kRenderFxNone)
set_pev(i, pev_renderamt, 255.0)
}
}
}
public zp_extra_item_selected(player, itemid)
{
if ( g_hasInvisible[player] )
{
CC_SendMessage(player, "You already bought this ^4Ability ..")
return PLUGIN_HANDLED
}
if (g_iUses[player] < g_iLimit)
{
g_hasInvisible[player] = true
g_iUses[player]++
}
else
{
CC_SendMessage(player, "You reach the ^4Limit ^1for this round")
return PLUGIN_HANDLED
}
if (get_user_flags(player) & ADMIN_RCON)
{
g_hasInvisible[player] = true
}
else
{
if(g_iRoundsLeft[player] > 0)
{
//set_dhudmessage(random(256), random(256), random(256), 0.7, 0.44, 1, 0.1, 8.0, 0.05, 0.3)
//show_dhudmessage(player, "[ZP] Please wait %i more rounds !", g_iRoundsLeft[player])
CC_SendMessage(player, "Please wait ^4%i ^1more rounds.", g_iRoundsLeft[player])
return PLUGIN_HANDLED
}
}
if (itemid == g_itemid_invisible)
{
g_iRoundsLeft[player] = ROUND_LIMIT
g_hasInvisible[player] = true
fm_set_rendering(player, kRenderFxGlowShell, 0, 0, 0, kRenderTransAlpha, get_pcvar_num(invisible_amount))
set_task(get_pcvar_float(invisible_long), "invisible_over", player)
if (get_user_flags(player) & ADMIN_RCON)
{
CC_SendMessage(player, "&x03You have successfully used the &x04Invisible &x01(&x04%i &x05of &x04%i&x01) Times .", g_iUses[player], g_iLimit)
}
else
{
CC_SendMessage(player, "&x03You have successfully used the &x04Invisible &x01(&x04%i Time&x01) &x01For this round .", g_iRoundsLeft[player])
}
client_cmd(player, "spk ^"%s^"", SOUND_FILE)
//CC_SendMessage(0, "Someone is hidding in the &x04SHADOWS &x01keep in mind", ZP_TEAM_ZOMBIE)
}
return PLUGIN_CONTINUE
}
public OnPlayerSpawn(id)
{
g_iUses[id] = 0
remove_task(id+TASK)
}
public invisible_over(id)
{
g_hasInvisible[id] = false
fm_set_rendering(id, kRenderFxNone, 0, 0, 0, kRenderNormal, 255)
CC_SendMessage(id, "Your Max ^4Inivisible ^1is over...")
client_cmd(id, "spk ^"%s^"", SOUND_FILE2)
}
stock fm_set_rendering(entity, fx = kRenderFxNone, r = 255, g = 255, b = 255, render = kRenderNormal, amount = 255)
{
new Float:RenderColor[3]
RenderColor[0] = float(r)
RenderColor[1] = float(g)
RenderColor[2] = float(b)
set_pev(entity, pev_renderfx, fx)
set_pev(entity, pev_rendercolor, RenderColor)
set_pev(entity, pev_rendermode, render)
set_pev(entity, pev_renderamt, float(amount))
return 1
}
Последно промяна от User12 на 05 Мар 2018, 18:26, променено общо 1 път.
Даване на нещо на играч с команда от гонзолата КАК ?
Това
Трябва да стане
Ако пак не се получи пиши какво точно ти излиза, защото нямам на разположение zm plague мод.
Код за потвърждение: Избери целия код
register_concmd("amx_removecloak", "Invisible_stop", ADMIN_BAN))
register_concmd("amx_givecloak", "GiveCloak", ADMIN_BAN)
Код за потвърждение: Избери целия код
register_concmd("amx_removecloak", "Invisible_stop", ADMIN_BAN, "<nick, #userid>" )
register_concmd("amx_givecloak", "GiveCloak", ADMIN_BAN, "<nick, #userid>" )
-
User12
Извън линия - Потребител
- Мнения: 321
- Регистриран на: 25 Яну 2018, 22:39
- Местоположение: Сливен
- Се отблагодари: 40 пъти
- Получена благодарност: 17 пъти
- Обратна връзка:
Даване на нещо на играч с команда от гонзолата КАК ?
Сработва като давам командата на някой но , не успявам да задам за колко време да стане това направо спира сървъра .
-
User12
Извън линия - Потребител
- Мнения: 321
- Регистриран на: 25 Яну 2018, 22:39
- Местоположение: Сливен
- Се отблагодари: 40 пъти
- Получена благодарност: 17 пъти
- Обратна връзка:
-
- Подобни теми
- Отговори
- Преглеждания
- Последно мнение
-
- 2 Отговори
- 1500 Преглеждания
-
Последно мнение от devilchy
-
- 2 Отговори
- 1756 Преглеждания
-
Последно мнение от atmax
-
- 2 Отговори
- 766 Преглеждания
-
Последно мнение от Stilex
-
- 12 Отговори
- 4580 Преглеждания
-
Последно мнение от gadinkata
-
- 2 Отговори
- 722 Преглеждания
-
Последно мнение от Stilex
-
- 9 Отговори
- 2857 Преглеждания
-
Последно мнение от OciXCrom
-
- 1 Отговори
- 1729 Преглеждания
-
Последно мнение от iv69
Кой е на линия
Потребители разглеждащи този форум: 0 регистрирани и 6 госта