mod problem
Try this code:
- #include <amxmodx>
- #include <hamsandwich>
- #include <fakemeta>
- #include <reapi>
- #define ALLOWED_KEY 55110
- new bool:g_bTKilledCT[33]
- public plugin_init()
- {
- register_plugin("No pickup Weapons", "1.0", "Raheem")
- // Hams
- RegisterHam(Ham_Touch, "weaponbox", "Fw_TouchWeaponBox_Pre", 0)
- RegisterHam(Ham_Touch, "armoury_entity", "Fw_TouchWeaponBox_Pre", 0)
- // Forwards
- register_forward(FM_SetModel, "Fw_SetModel")
- // Events
- register_event("DeathMsg", "DeathMsgEvent", "a");
- }
- public Fw_TouchWeaponBox_Pre(iEnt, iIndex)
- {
- if(!is_user_alive(iIndex))
- return HAM_IGNORED
- // Block T From Pick UP Weapons
- if(get_member(iIndex, m_iTeam) == TEAM_TERRORIST && !(pev(iEnt, pev_impulse) == ALLOWED_KEY))
- {
- client_print(iIndex, print_center, "You can't pickup guns!")
- return HAM_SUPERCEDE
- }
- return HAM_IGNORED
- }
- public Fw_SetModel(iEnt, szModel[])
- {
- if(!pev_valid(iEnt))
- return FMRES_IGNORED
- new iOwner = pev(iEnt, pev_owner)
- if (g_bTKilledCT[iOwner])
- {
- set_pev(iEnt, pev_impulse, ALLOWED_KEY)
- }
- return FMRES_IGNORED
- }
- public DeathMsgEvent()
- {
- new iAttacker = read_data(1);
- new iVictim = read_data(2);
- if (get_member(iAttacker, m_iTeam) == TEAM_TERRORIST && get_user_weapon(iAttacker) == CSW_KNIFE)
- {
- g_bTKilledCT[iVictim] = true;
- }
- }
Th3 king should we use this plugin ? or only him cuz he uses outdated version of our mod ? becuz i don't have this bug on my server.
You should not use it, already included in our Mod.
And what th3_king posted is a general purpose one, i wrote it for DR Mod.
And what th3_king posted is a general purpose one, i wrote it for DR Mod.
He who fails to plan is planning to fail
Create an account or sign in to join the discussion
You need to be a member in order to post a reply
Create an account
Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute
Sign in
Who is online
Users browsing this forum: No registered users and 2 guests