Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <amxmodx>
- #include <cstrike>
- #include <fun>
- #include <hamsandwich>
- #define PLUGIN "Beneficii Steam"
- #define VERSION "1.0"
- #define AUTHOR "****"
- new bool:event
- public plugin_init() {
- register_plugin(PLUGIN, VERSION, AUTHOR)
- RegisterHam(Ham_Spawn, "player", "player_steam", 1);
- VERIFY_TIME()
- set_task(60.0,"VERIFY_TIME",.flags="b")
- }
- public VERIFY_TIME()
- {
- new timp[32]
- get_time("%H:%M",timp,charsmax(timp))
- if(equal(timp,"08:30")) event=true
- if(equal(timp,"21:00")) event=false
- }
- public player_steam(id)
- {
- if(!event) return HAM_IGNORED
- if(is_user_steam(id) && is_user_alive(id) && user_has_weapon(id, CSW_USP))
- {
- strip_user_weapons (id)
- give_item(id,"weapon_deagle");
- cs_set_user_bpammo(id, CSW_DEAGLE, 35);
- give_item(id,"weapon_knife");
- give_item(id,"weapon_hegrenade");
- give_item(id,"weapon_flashbang");
- give_item(id,"weapon_flashbang");
- give_item(id,"item_assaultsuit");
- give_item(id,"item_thighpack");
- client_print(id, print_center, "Ai Primit Beneficiile.")
- }
- else if(is_user_steam(id) && is_user_alive(id) && user_has_weapon(id, CSW_GLOCK18))
- {
- strip_user_weapons (id)
- give_item(id,"weapon_deagle");
- cs_set_user_bpammo(id, CSW_DEAGLE, 35);
- give_item(id,"weapon_knife");
- give_item(id,"weapon_hegrenade");
- give_item(id,"weapon_flashbang");
- give_item(id,"weapon_flashbang");
- give_item(id,"item_assaultsuit");
- give_item(id,"item_thighpack");
- client_print(id, print_center, "Ai Primit Beneficiile.")
- }
- else
- {
- give_item(id,"weapon_knife");
- give_item(id,"weapon_hegrenade");
- give_item(id,"weapon_flashbang");
- give_item(id,"weapon_flashbang");
- give_item(id,"item_assaultsuit");
- give_item(id,"item_thighpack");
- client_print(id, print_center, "Ai Primit Beneficiile.")
- }
- return HAM_IGNORED;
- }
- stock bool:is_user_steam(id)
- {
- static dp_pointer
- if(dp_pointer || (dp_pointer = get_cvar_pointer("dp_r_id_provider")))
- {
- server_cmd("dp_clientinfo %d", id)
- server_exec()
- return (get_pcvar_num(dp_pointer) == 2) ? true : false
- }
- return false
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement