Amx_restrict, amx_restrict on/off ak47 |
![]() |
|
Group: Member Posts: 133 Joined: 30/07/2008 ![]() ![]() |
bonsoir
je recherche pour avoir la commande amx_restrict dans les cvar de amx http://wiki.amxmodx.org/Configuring_AMX_Mod_X#CVARs_2 amx_restrict on/off ak47 c'est pour les VIPs du serveur merci |
|
|
![]() |
![]() |
|
Group: Member Posts: 126 Joined: 22/11/2005 ![]() ![]() ![]() |
J'utilise ça, ça calque l'argent de début de round sur la variable mp_startmoney :
CODE /* Copyright © 2008, ConnorMcLeod
Round StartMoney is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Round StartMoney; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <amxmodx> #include <fakemeta> #define VERSION "0.4.0" #define Money_Amount 1 #define XTRA_OFS_PLAYER 5 #define m_iAccount 115 new g_pCvarStartMoney, g_iStartMoney, gmsgMoney, g_iMhMoney, Float:g_flRoundStartGameTime public plugin_init() { register_plugin( "Round StartMoney", VERSION, "ConnorMcLeod" ) register_event("HLTV", "Event_HLTV_New_Round", "a", "1=0", "2=0") g_pCvarStartMoney = get_cvar_pointer("mp_startmoney") gmsgMoney = get_user_msgid("Money") } public Event_HLTV_New_Round() { g_flRoundStartGameTime = get_gametime() g_iStartMoney = get_pcvar_num(g_pCvarStartMoney) SetMoneyHookStatus( true ) } public Message_Money(iMsgId, iMsgDest, id) { if( get_gametime() != g_flRoundStartGameTime ) { SetMoneyHookStatus( false ) return } new iAmount = get_msg_arg_int(Money_Amount) if( iAmount && iAmount < g_iStartMoney ) { set_pdata_int(id, m_iAccount, g_iStartMoney, XTRA_OFS_PLAYER) set_msg_arg_int(Money_Amount, ARG_LONG, g_iStartMoney) } } SetMoneyHookStatus( bool:bActive ) { if( bActive ) { if( !g_iMhMoney ) { static const szCallBack[] = "Message_Money" g_iMhMoney = register_message(gmsgMoney, szCallBack) } } else { if( g_iMhMoney ) { unregister_message(gmsgMoney, g_iMhMoney) g_iMhMoney = 0 } } } |
|
|
![]() ![]() |
![]() |
Lo-Fi Version |
Skin © Chapo
|