This works for me (tip is ti unset player vip and reset after gave weapons) :
PHP Code:
/* Formatright © 2009, ConnorMcLeod
VIP test 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 VIP test; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <amxmodx>
#include <cstrike>
#include <fakemeta>
#include <fun>
#include <hamsandwich>
#define VERSION "0.0.1"
public plugin_init()
{
register_plugin("VIP test", VERSION, "ConnorMcLeod")
RegisterHam(Ham_AddPlayerItem, "player", "Player_AddPlayerItem")
}
public Player_AddPlayerItem( id , iWeapon )
{
if( cs_get_user_vip(id)
&& ExecuteHam(Ham_Item_GetWeaponPtr, iWeapon) == iWeapon
&& cs_get_weapon_id(iWeapon) == CSW_USP )
{
cs_set_user_vip(id, 0, 0, 0)
give_item(id, "weapon_fiveseven")
cs_set_user_bpammo(id, CSW_FIVESEVEN, 100)
give_item(id, "weapon_m4a1")
cs_set_user_bpammo(id, CSW_M4A1, 90)
client_print(id, print_chat, "[VIP] You are the VIP. Have fun and good luck")
cs_set_user_vip(id, 1, 0, 0)
set_pev(iWeapon, pev_flags, pev(iWeapon, pev_flags) | FL_KILLME)
SetHamReturnInteger(0)
return HAM_SUPERCEDE
}
return HAM_IGNORED
}
__________________