Raised This Month: $ Target: $400
 0% 

screen shake


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
layka_LUBII
Senior Member
Join Date: Jul 2012
Old 03-06-2013 , 15:53   screen shake
Reply With Quote #1

Hi, I need to remake plugin.
I need so that when player write /tras begins to shake CT team
THANK YOU


Code:
#include <amxmodx>
#include <amxmisc>
public plugin_init()
{
   register_plugin("Shake It baby!","1.0","ThantiK")
   register_clcmd("amx_shake","amx_shake",ADMIN_LEVEL_A,"<name or id>")
   return PLUGIN_CONTINUE
}
public amx_shake(id,level,cid){
   if (!cmd_access(id,level,cid,2))
          return PLUGIN_HANDLED
   new target[32]
   read_argv(1,target,31)
  
   if (target[0]=='@') {
          new team[32], team_num
          get_players(team,team_num,"ae",target[1])
          if (!team_num) {
                 console_print(id,"[AMX] No clients found on provided team. (@CT or @TERRORIST)")
                 return   PLUGIN_HANDLED
          }
          for (new i=0;i<team_num;i++) {
          new gmsgShake = get_user_msgid("ScreenShake")
          message_begin(MSG_ONE, gmsgShake, {0,0,0}, team[i])
          write_short(255<< 14 ) //ammount
          write_short(10 << 14) //lasts this long
          write_short(255<< 14) //frequency
          message_end()
          }
   }
   else if (target[0]=='*') {
          new all[32], all_num
          get_players(all,all_num,"a")
          for (new i=0;i<all_num;i++) {
          new gmsgShake = get_user_msgid("ScreenShake")
          message_begin(MSG_ONE, gmsgShake, {0,0,0}, all[i])
          write_short(255<< 14 ) //ammount
          write_short(10 << 14) //lasts this long
          write_short(255<< 14) //frequency
          message_end()
          }
}
   else {
          new player = cmd_target(id, target,31)
          new gmsgShake = get_user_msgid("ScreenShake")
          if(is_user_alive(player)){
          message_begin(MSG_ONE, gmsgShake, {0,0,0}, player)
          write_short(255<< 14 ) //ammount
          write_short(10 << 14) //lasts this long
          write_short(255<< 14) //frequency
          message_end()
          }
}
   return PLUGIN_HANDLED   
}
layka_LUBII is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:40.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode