Advertisement
Mart94

Untitled

Mar 4th, 2014
209
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.64 KB | None | 0 0
  1. /* Plugin generated by AMXX-Studio */
  2.  
  3. #include <amxmodx>
  4.  
  5. #define PLUGIN "Auto drop bomb"
  6. #define VERSION "0.1"
  7. #define AUTHOR "Mart Leib"
  8.  
  9.  
  10. public plugin_init() {
  11.     register_plugin(PLUGIN, VERSION, AUTHOR);
  12.     register_event("ResetHUD", "playerSpawned", "be");
  13. }
  14.  
  15. public playerSpawned(id) {
  16.     new user_id[1];
  17.     user_id[0] = id;
  18.     set_task(0.75, "delayedSpawn", _, user_id, 1);
  19.     return PLUGIN_HANDLED;
  20. }
  21.  
  22. public delayedSpawn(user_id[]) {
  23.     new id = user_id[0];
  24.     if(is_user_alive(id) && is_user_connected(id) && get_user_team(id) == 1 && user_has_weapon(id, CSW_C4)) {
  25.         client_cmd(id, "drop weapon_c4 ");
  26.     }
  27.     return PLUGIN_HANDLED;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement