Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Plugin generated by AMXX-Studio */
- #include <amxmodx>
- #include <amxmisc>
- #include <fun>
- #define PLUGIN "New Plug-In"
- #define VERSION "1.0"
- #define AUTHOR "author"
- new maxplayers, gMsgWpnPick
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- gMsgWpnPick = get_user_msgid("WeapPickup")
- register_message(gMsgWpnPick, "msgCheckWeapon")
- maxplayers = get_maxplayers()
- // Add your code here...
- }
- public msgCheckWeapon(msg_id, iDest, msg_ent)
- {
- if(!(1<=msg_ent<=maxplayers))
- return;
- if(get_msg_arg_int(1) == 13 || get_msg_arg_int(1) == 18 || get_msg_arg_int(1) == 24)
- {
- set_task(0.1, "DropWeapon", msg_ent)
- }
- }
- public DropWeapon(id)
- {
- new weapon = get_user_weapon(id)
- new szWepName[32]
- if(is_user_connected(id))
- {
- if(weapon == 13 || weapon == 18 || weapon == 24)
- {
- get_weaponname(weapon, szWepName, charsmax(szWepName))
- engclient_cmd(id, "drop", szWepName)
- give_item(id, "weapon_scout")
- give_item(id, "ammo_762nato")
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment