Правила форума Гаранты форума
Размещение рекламы AMX-X компилятор

Здравствуйте, гость Вход | Регистрация

Наши новости:

14-дек
24-апр
10-апр
11-апр

aBonus

, помогите изменить aBonus
bydefo
сообщение 16.2.2015, 16:09
Сообщение #1
Стаж: 11 лет

Сообщений: 713
Благодарностей: 122
Полезность: 26

Army System (EA) 2.1.5
Помогите пожалуйста в этой системе есть бонусы но она работает с 3 раунда
помогите пожалуйсто пере компелировать что бы она отлавливала спавн
у меня захват флага(
вот исходник
Скрытый текст
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < fun >

#define PLUGIN "AS module bonus"
#define VERSION "3.1"
#define AUTHOR "OverGame"

#pragma tabsize 0

#define PRIMARY_WEAPONS_BITSUM ((1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90))
#define SECONDARY_WEAPONS_BITSUM ((1<<CSW_DEAGLE)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_ELITE))

new const cPrefix[] = "!t[!gArmy Bonus!t]!y"
new const mPrefix[] = "\d[Army Bonus]\r"

new BonusPrice[6], BonusActive, lExit[100], lNext[100], lBack[100], UserVampire[64], Active

new ct_score, terrorist_score, gMsgHud, gMaxPlayers, gClrR, gClrG, gClrB

native get_as_bonus(id)
native set_as_bonus(id, num)

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("RoundStart", 2, "1=Round_Start")
register_event("DeathMsg","EventKilling", "a", "1>0")
register_event("TeamScore", "team_score", "a")

register_clcmd("anew", "army_bonus")
register_clcmd("abonus", "army_bonus")
register_clcmd("say /anew", "army_bonus")
register_clcmd("say_team /anew", "army_bonus")

gClrR = register_cvar("as_color_r", "255")
gClrG = register_cvar("as_color_g", "255")
gClrB = register_cvar("as_color_b", "255")

BonusPrice[1] = register_cvar("as_bonus_item1", "4")
BonusPrice[2] = register_cvar("as_bonus_item2", "4")
BonusPrice[3] = register_cvar("as_bonus_item3", "7")
BonusPrice[4] = register_cvar("as_bonus_item4", "4")
BonusPrice[5] = register_cvar("as_bonus_item5", "30")

BonusActive = register_cvar("as_bonus_active_round", "2")

gMsgHud = CreateHudSyncObj()
gMaxPlayers = get_maxplayers()

set_task(1.0, "bonus_info", _, _, _, "b")

register_dictionary("abonus.txt")
}

public plugin_cfg()
{
new szCfgDir[ 64 ], szFile[ 192 ]
get_configsdir( szCfgDir, charsmax( szCfgDir ) )
formatex( szFile,charsmax(szFile),"%s/as_setting.cfg", szCfgDir )
if( file_exists( szFile ) )
server_cmd( "exec %s", szFile )
}

public RoundStart()
{
Active = true
set_task(15.0, "off_menu", 0)
}

public off_menu()
{
Active = false
}

public team_score()
{
new team[32]
read_data(1,team,31)
if (equal(team,"CT"))
{
ct_score = read_data(2)
} else
if (equal(team,"TERRORIST"))
{
terrorist_score = read_data(2)
}
}

public client_putinserver(id)
{
UserVampire[id] = false
Active = false
}

public army_bonus(id)
{
if ( !is_user_alive(id) )
{
ShowMsg( id, "%s %L", cPrefix, LANG_PLAYER, "MENU_ALIVE" )
return PLUGIN_HANDLED
}

if ( !Active )
{
ShowMsg( id, "%s %L", cPrefix, LANG_PLAYER, "MENU_ACTIVE" )
return PLUGIN_HANDLED
}

new szRound, stat_round
szRound = get_pcvar_num(BonusActive) + 1
stat_round = ct_score + terrorist_score

if ( stat_round < szRound )
{
ShowMsg( id, "%s %L", cPrefix, LANG_PLAYER, "MENU_ROUND_ERROR", szRound )
return PLUGIN_HANDLED
}

static s_MenuItem[255], s_Gen[255], s_Item[255], s_Temp[10]

formatex( s_MenuItem, charsmax(s_MenuItem), "%s %L^n\y%L\r %d", mPrefix, LANG_PLAYER, "MENU_CAPTION", LANG_PLAYER, "MENU_BONUSES", get_as_bonus(id) )

new menu = menu_create( s_MenuItem, "abonus_handl" )

for(new i = 1; i < 6; i++)
{
formatex(s_Gen[i], charsmax(s_Gen), "MENU_ITEM%d", i)
formatex(s_Item[i], charsmax(s_Item), "\y%L \d[%d %L]", LANG_PLAYER, s_Gen[i], get_pcvar_num(BonusPrice[i]), LANG_PLAYER, "MENU_PRICE")

num_to_str(i, s_Temp, charsmax(s_Temp))

menu_additem(menu, s_Item[i], s_Temp, 0)
}

formatex(lBack, charsmax(lBack), "%L", LANG_PLAYER, "MENU_BACK")
formatex(lNext, charsmax(lNext), "%L", LANG_PLAYER, "MENU_NEXT")
formatex(lExit, charsmax(lExit), "%L", LANG_PLAYER, "MENU_EXIT")

menu_setprop( menu, MPROP_BACKNAME, lBack )
menu_setprop( menu, MPROP_NEXTNAME, lNext )
menu_setprop( menu, MPROP_EXITNAME, lExit )

menu_display( id, menu, 0 )
return PLUGIN_HANDLED
}

public abonus_handl(id, menu, item)
{
if ( item == MENU_EXIT )
{
menu_destroy( menu )
return PLUGIN_HANDLED
}

new data[ 6 ], iName[ 64 ], access, callback, s_Gen[255], buffer[255]
menu_item_getinfo( menu, item, access, data, 5, iName, 63, callback )

new key = str_to_num( data )

switch( key )
{
case 1:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 2:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

give_item(id, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 3:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

give_item(id, "weapon_AWP")
cs_set_user_bpammo(id, CSW_AWP, 30)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 4:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

give_item(id, "weapon_famas")
cs_set_user_bpammo(id, CSW_FAMAS, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 5:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

UserVampire[id] = true
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
}

ShowMsg(id, "%s %s", cPrefix, buffer)

return PLUGIN_HANDLED
}

public EventKilling()
{
new thekiller
thekiller = read_data ( 1 )

if ( !UserVampire[thekiller] )
return PLUGIN_HANDLED

if ( read_data ( 5 ) == 0 )
{
message_begin ( MSG_ONE, get_user_msgid ( "ScreenFade" ) , { 0, 0, 0 }, thekiller )
write_short ( 1<<10 )
write_short ( 1<<10 )
write_short ( 0x0000 )
write_byte ( 0 )
write_byte ( 255 )
write_byte ( 0 )
write_byte ( 75 )
message_end()

if ( get_user_health(thekiller) <= 100 )
{
set_user_health(thekiller, get_user_health(thekiller) + 25)

if ( get_user_health(thekiller) > 100 )
set_user_health(thekiller, 100)
}
}

return PLUGIN_HANDLED
}

public bonus_info()
{
if ( !Active )
return PLUGIN_HANDLED

new szRound, stat_round
szRound = get_pcvar_num(BonusActive) + 1
stat_round = ct_score + terrorist_score

if ( stat_round < szRound )
return PLUGIN_HANDLED

for (new id = 0; id <= gMaxPlayers; id++)
{
if(!is_user_bot(id) && is_user_connected(id))
{
static buffer[192]
set_hudmessage(get_pcvar_num(gClrR), get_pcvar_num(gClrG), get_pcvar_num(gClrB), -1.0, 0.9, 0, 15.0, 1.0, _, _, -1)

format(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MY_BONUS", get_as_bonus(id))

ShowSyncHudMsg(id, gMsgHud, buffer)
}
}

return PLUGIN_CONTINUE
}

stock drop_secondary(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num )
for( new i = 0; i < num; i++ )
{
if ( SECONDARY_WEAPONS_BITSUM & (1<<weapons[ i ]) )
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}

stock drop_primary(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num )
for( new i = 0; i < num; i++ )
{
if ( PRIMARY_WEAPONS_BITSUM & (1<<weapons[ i ]) )
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}

stock ShowMsg(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[188]
vformat(msg, 187, input, 3)

replace_all(msg, 187, "!g", "^4")
replace_all(msg, 187, "!y", "^1")
replace_all(msg, 187, "!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(msg)
message_end()
}
}
}
}


Отредактировал: Bloo, - 16.2.2015, 16:33
Причина: Выдано устное предупреждение!
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   Цитировать сообщение
Статус пользователя MiXa
сообщение 17.2.2015, 8:33
Сообщение #2


Стаж: 12 лет

Сообщений: 415
Благодарностей: 91
Полезность: 181

Тут вместо учета раундов, надо считать количество возрождений для каждого игрока :)

и код плагина вставьте в тэг pawn

Отредактировал: MiXa, - 17.2.2015, 8:34


Допомога з встановлення / налаштування / оновлення за $ :>>> Сервери \ Моди \ Плагіни \ Модулі
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
bydefo
сообщение 17.2.2015, 13:21
Сообщение #3
Стаж: 11 лет

Сообщений: 713
Благодарностей: 122
Полезность: 26

Цитата(MiXa @ 17.2.2015, 8:33) *
Тут вместо учета раундов, надо считать количество возрождений для каждого игрока :)

и код плагина вставьте в тэг pawn

можно по канкретнее подробнее обьяснить? что куда вставить?
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
OverGame
сообщение 17.2.2015, 14:22
Сообщение #4
Стаж: 11 лет

Сообщений: 384
Благодарностей: 217
Полезность: 348

Исправил.

Код:
#include < amxmodx >
#include < amxmisc >
#include < cstrike >
#include < hamsandwich >
#include < fun >

#define PLUGIN "AS module bonus"
#define VERSION "3.1"
#define AUTHOR "OverGame"

#pragma tabsize 0

#define PRIMARY_WEAPONS_BITSUM ((1<<CSW_SCOUT)|(1<<CSW_XM1014)|(1<<CSW_MAC10)|(1<<CSW_AUG)|(1<<CSW_UMP45)|(1<<CSW_SG550)|(1<<CSW_GALIL)|(1<<CSW_FAMAS)|(1<<CSW_AWP)|(1<<CSW_MP5NAVY)|(1<<CSW_M249)|(1<<CSW_M3)|(1<<CSW_M4A1)|(1<<CSW_TMP)|(1<<CSW_G3SG1)|(1<<CSW_SG552)|(1<<CSW_AK47)|(1<<CSW_P90))
#define SECONDARY_WEAPONS_BITSUM ((1<<CSW_DEAGLE)|(1<<CSW_USP)|(1<<CSW_GLOCK18)|(1<<CSW_ELITE))

new const cPrefix[] = "!t[!gArmy Bonus!t]!y"
new const mPrefix[] = "\d[Army Bonus]\r"

new BonusPrice[6], lExit[100], lNext[100], lBack[100], UserVampire[64], Active[64]

new gMsgHud, gMaxPlayers, gClrR, gClrG, gClrB

native get_as_bonus(id)
native set_as_bonus(id, num)

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
RegisterHam( Ham_Spawn, "player", "event_spawn" )
register_event("DeathMsg","EventKilling", "a", "1>0")

register_clcmd("anew", "army_bonus")
register_clcmd("abonus", "army_bonus")
register_clcmd("say /anew", "army_bonus")
register_clcmd("say_team /anew", "army_bonus")

gClrR = register_cvar("as_color_r", "255")
gClrG = register_cvar("as_color_g", "255")
gClrB = register_cvar("as_color_b", "255")

BonusPrice[1] = register_cvar("as_bonus_item1", "4")
BonusPrice[2] = register_cvar("as_bonus_item2", "4")
BonusPrice[3] = register_cvar("as_bonus_item3", "7")
BonusPrice[4] = register_cvar("as_bonus_item4", "4")
BonusPrice[5] = register_cvar("as_bonus_item5", "30")

gMsgHud = CreateHudSyncObj()
gMaxPlayers = get_maxplayers()

set_task(1.0, "bonus_info", _, _, _, "b")

register_dictionary("abonus.txt")
}

public plugin_cfg()
{
new szCfgDir[ 64 ], szFile[ 192 ]
get_configsdir( szCfgDir, charsmax( szCfgDir ) )
formatex( szFile,charsmax(szFile),"%s/as_setting.cfg", szCfgDir )
if( file_exists( szFile ) )
server_cmd( "exec %s", szFile )
}

public event_spawn( id )
{
Active [ id ] = true
}

public client_putinserver(id)
{
UserVampire[id] = false
}

public army_bonus(id)
{
if ( !is_user_alive(id) )
{
ShowMsg( id, "%s %L", cPrefix, LANG_PLAYER, "MENU_ALIVE" )
return PLUGIN_HANDLED
}

if ( !Active [ id ] )
{
ShowMsg( id, "%s %L", cPrefix, LANG_PLAYER, "MENU_ACTIVE" )
return PLUGIN_HANDLED
}

static s_MenuItem[255], s_Gen[255], s_Item[255], s_Temp[10]

formatex( s_MenuItem, charsmax(s_MenuItem), "%s %L^n\y%L\r %d", mPrefix, LANG_PLAYER, "MENU_CAPTION", LANG_PLAYER, "MENU_BONUSES", get_as_bonus(id) )

new menu = menu_create( s_MenuItem, "abonus_handl" )

for(new i = 1; i < 6; i++)
{
formatex(s_Gen[i], charsmax(s_Gen), "MENU_ITEM%d", i)
formatex(s_Item[i], charsmax(s_Item), "\y%L \d[%d %L]", LANG_PLAYER, s_Gen[i], get_pcvar_num(BonusPrice[i]), LANG_PLAYER, "MENU_PRICE")

num_to_str(i, s_Temp, charsmax(s_Temp))

menu_additem(menu, s_Item[i], s_Temp, 0)
}

formatex(lBack, charsmax(lBack), "%L", LANG_PLAYER, "MENU_BACK")
formatex(lNext, charsmax(lNext), "%L", LANG_PLAYER, "MENU_NEXT")
formatex(lExit, charsmax(lExit), "%L", LANG_PLAYER, "MENU_EXIT")

menu_setprop( menu, MPROP_BACKNAME, lBack )
menu_setprop( menu, MPROP_NEXTNAME, lNext )
menu_setprop( menu, MPROP_EXITNAME, lExit )

menu_display( id, menu, 0 )
return PLUGIN_HANDLED
}

public abonus_handl(id, menu, item)
{
if ( item == MENU_EXIT )
{
menu_destroy( menu )
return PLUGIN_HANDLED
}

new data[ 6 ], iName[ 64 ], access, callback, s_Gen[255], buffer[255]
menu_item_getinfo( menu, item, access, data, 5, iName, 63, callback )

new key = str_to_num( data )

switch( key )
{
case 1:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

Active [ id ] = false
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 2:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

Active [ id ] = false
give_item(id, "weapon_ak47")
cs_set_user_bpammo(id, CSW_AK47, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 3:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

Active [ id ] = false
give_item(id, "weapon_awp")
cs_set_user_bpammo(id, CSW_AWP, 30)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 4:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

drop_primary(id)

Active [ id ] = false
give_item(id, "weapon_famas")
cs_set_user_bpammo(id, CSW_FAMAS, 90)
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
case 5:
{
if ( get_as_bonus(id) >= get_pcvar_num(BonusPrice[key]) )
{
formatex(s_Gen[key], charsmax(s_Gen), "MENU_HAVE%d", key)
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, s_Gen[key])

set_as_bonus(id, get_as_bonus(id) - get_pcvar_num(BonusPrice[key]))

Active [ id ] = false
UserVampire[id] = true
} else {
formatex(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MENU_NOB")
}
}
}

ShowMsg(id, "%s %s", cPrefix, buffer)

return PLUGIN_HANDLED
}

public EventKilling()
{
new thekiller
thekiller = read_data ( 1 )

if ( !UserVampire[thekiller] )
return PLUGIN_HANDLED

if ( read_data ( 5 ) == 0 )
{
message_begin ( MSG_ONE, get_user_msgid ( "ScreenFade" ) , { 0, 0, 0 }, thekiller )
write_short ( 1<<10 )
write_short ( 1<<10 )
write_short ( 0x0000 )
write_byte ( 0 )
write_byte ( 255 )
write_byte ( 0 )
write_byte ( 75 )
message_end()

if ( get_user_health(thekiller) <= 100 )
{
set_user_health(thekiller, get_user_health(thekiller) + 25)

if ( get_user_health(thekiller) > 100 )
set_user_health(thekiller, 100)
}
}

return PLUGIN_HANDLED
}

public bonus_info()
{
for (new id = 0; id <= gMaxPlayers; id++)
{
if ( !Active [ id ] )
return PLUGIN_HANDLED

if(!is_user_bot(id) && is_user_connected(id))
{
static buffer[192]
set_hudmessage(get_pcvar_num(gClrR), get_pcvar_num(gClrG), get_pcvar_num(gClrB), -1.0, 0.9, 0, 15.0, 1.0, _, _, -1)

format(buffer, charsmax(buffer), "%L", LANG_PLAYER, "MY_BONUS", get_as_bonus(id))

ShowSyncHudMsg(id, gMsgHud, buffer)
}
}

return PLUGIN_CONTINUE
}

stock drop_secondary(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num )
for( new i = 0; i < num; i++ )
{
if ( SECONDARY_WEAPONS_BITSUM & (1<<weapons[ i ]) )
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}

stock drop_primary(id)
{
new weapons[32], num
get_user_weapons(id, weapons, num )
for( new i = 0; i < num; i++ )
{
if ( PRIMARY_WEAPONS_BITSUM & (1<<weapons[ i ]) )
{
static wname[32]
get_weaponname(weapons[i], wname, sizeof wname - 1)
engclient_cmd(id, "drop", wname)
}
}
}

stock ShowMsg(const id, const input[], any:...)
{
new count = 1, players[32]
static msg[188]
vformat(msg, 187, input, 3)

replace_all(msg, 187, "!g", "^4")
replace_all(msg, 187, "!y", "^1")
replace_all(msg, 187, "!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(msg)
message_end()
}
}
}
}


Отредактировал: OverGame, - 17.2.2015, 14:31
Перейти в начало страницы         Просмотр профиля    Отправить личное сообщение
   + Цитировать сообщение
  Ответить в данную темуНачать новую тему
 
0 пользователей и 1 гостей читают эту тему: