User
Pass
2FA
 
 

Team Flash Snitch

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources
Author Message1761
Z3ddy

[Mentally Stable]



Status: Offline
(since 15-01-2014 20:51)
Joined: 13 Feb 2009
Posts: 87, Topics: 29
Location: Bucuresti

Reputation: 379.7
Votes: 5

 
Post Posted: 26-10-2011, 18:09:16 | Translate post to: ... (Click for more languages)

De unde trebuie sa sterg si pana unde din SMA ca sa nu mai apara in serverul CMD cand pornesc serverul si cand se schimba harta, mesajul "[Team Flash Snitch] All settings loaded successfully!" ?

SMA: http://www.multiupload.com/QE0EZE1L51

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
SchmetZ

[Mentally Stable]



Status: Offline
(since 16-06-2013 12:17)
Joined: 17 Oct 2011
Posts: 271, Topics: 43
Location: hns.freakz.ro

Reputation: 53.4
Votes: 4

 
Post Posted: 27-10-2011, 11:57:21 | Translate post to: ... (Click for more languages)

Vrei sa nu mai apara mesajul asta in chat?

Code:
"[Team Flash Snitch] All settings loaded successfully!"



E.L: Aici gasesti pluginul fara ca mesajul respectiv sa apara in consola serverului (am scos server_cmd)



hns.freakz.ro

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
Z3ddy

[Mentally Stable]



Status: Offline
(since 15-01-2014 20:51)
Joined: 13 Feb 2009
Posts: 87, Topics: 29
Location: Bucuresti

Reputation: 379.7
Votes: 5

 
Post Posted: 27-10-2011, 14:44:01 | Translate post to: ... (Click for more languages)

te rog posteza sma-ul, vreau sa invat si eu si sa inteleg prin el ce a fost sters -
mersi frumos

0 0
  
Back to top
View user's profile Send private message Yahoo! Messenger ID
PoSiTiOn Of PoWeR

[ZP.FREAKZ.RO OWNER]



Status: Offline
(since 07-10-2015 14:51)
Joined: 25 Oct 2008
Posts: 712, Topics: 77
Location: Germany

Reputation: 185.3
Votes: 18

Post Posted: 27-10-2011, 17:33:03 | Translate post to: ... (Click for more languages)

Code:
server_cmd("echo ....")

Asta trimite mesaje in consola serverului.
Iar pluginu care nu mai trimite mesajul care doresti tu:
Code:

#include <amxmodx>
#include <fakemeta>

#define TEMPENTITY   "23"
#define BLINDED_FULLY   255
#define BLINDED_PARTLY   200
#define MAX_ENT 1126

new const TFSVERSION[] = "2"

new g_v_entity[MAX_ENT] = {0, ...}  // entity owner remember
new g_flasher = 0       // id of the flasher
new monitor[33];
new task_mon

public plugin_init()
{
   register_plugin("Team Flash Snitch Advanced",TFSVERSION,"OT")
   
   register_cvar("tfs_sound","1")
   register_cvar("tfs_adminchat","0")
   
   register_event("ScreenFade", "event_blinded", "be", "4=255", "5=255", "6=255", "7>199")
   
   register_forward(FM_SetModel, "fw_setmodel")
   register_forward(FM_EmitSound,"fw_emitsound")
   
   new fwdid
   
   for (new i=0;i<33;i++)
   {
      monitor[i] = engfunc(EngFunc_CreateNamedEntity,engfunc(EngFunc_AllocString,"info_target"))
      
      if (monitor[i])
      {
         set_pev(monitor[i],pev_classname,"flash_commentator")
      }
   }
   
   task_mon = monitor[0]
   
   fwdid = register_forward(FM_Think,"fw_comment")
   
   new k = 0;
   
   for (new i=0;i<33;i++)
      if (!monitor[i])
      {
         k = 1;
         unregister_forward(FM_Think,fwdid)
         server_cmd("echo [Team Flash Snitch] Error!!! Problem with creating entities!")
         log_amx("[Team Flash Snitch] Error!!! Problem with creating entities!")
         break;
      }
      
/*   if (k == 0)
   {
      server_cmd("echo [Team Flash Snitch] All settings loaded successfully!")
   }
*/   
}

public fw_comment(ent)
{
   if (!pev_valid(ent))
      return FMRES_IGNORED;
   
   new classname[32]
   pev(ent,pev_classname,classname,31)
   
   if (!equal(classname,"flash_commentator"))
      return FMRES_IGNORED;
   
   if (pev(ent,pev_iuser1) == 0)
      return FMRES_IGNORED;
   
   if (ent == task_mon)
   {
      reset_flasher()
      set_pev(ent,pev_iuser1,0)
      return FMRES_IGNORED;
   }
   
   if (pev(ent,pev_iuser2) < BLINDED_PARTLY)
      return FMRES_IGNORED;
   
   show_news(pev(ent,pev_iuser1) + pev(ent,pev_iuser2))
   
   set_pev(ent,pev_iuser1,0)
   set_pev(ent,pev_iuser2,0)
   
   return FMRES_IGNORED;
}

public plugin_end()
{
   for (new i=1;i<33;i++)
      engfunc(EngFunc_RemoveEntity,monitor[i])
}

public plugin_precache()
{
   engfunc(EngFunc_PrecacheSound,"radio/bot/im_blind.wav")
   return PLUGIN_CONTINUE
}

public event_blinded(id)
{
   new alpha = read_data(7)
   
   if (alpha != BLINDED_FULLY && alpha != BLINDED_PARTLY || !is_user_alive(id))
      return PLUGIN_CONTINUE
   
   if (alpha == BLINDED_FULLY)
   {
      set_pev(monitor[id],pev_nextthink,get_gametime() + 0.005)
      set_pev(monitor[id],pev_iuser1,id)
      set_pev(monitor[id],pev_iuser2,BLINDED_FULLY)
   }
   else if (alpha >= BLINDED_PARTLY)
   {
      set_pev(monitor[id],pev_nextthink,get_gametime() + 0.005)
      set_pev(monitor[id],pev_iuser1,id)
      set_pev(monitor[id],pev_iuser2,BLINDED_PARTLY)
   }
   
   return PLUGIN_CONTINUE
}


public show_news(id)
{
   new alpha;
   
   if (id > BLINDED_FULLY)
   {
      alpha = BLINDED_FULLY
      id -= BLINDED_FULLY
   }
   else
   {
      alpha = random_num(BLINDED_PARTLY,BLINDED_FULLY - 1)
      id -= BLINDED_PARTLY
   }
   
   
   if (get_user_team(id) == get_user_team(g_flasher) && id != g_flasher)
   {
      new message1[128], message2[128]
      new flasher[32], name[32]
      
      get_user_name(g_flasher, flasher, 31)
      get_user_name(id, name, 31)
      
      format(message1, 127, "^x04[Team Flash Snitch]^x01 You've been teamflashed by ^x03%s", flasher)   
      format(message2, 127, "^x04[Team Flash Snitch]^x01 You %sflashed a teammate ^x03(%s)", alpha == BLINDED_FULLY ? "totally " : "", name)
      
      colored_msg(id,message1)
      colored_msg(g_flasher,message2)
      
      if(get_cvar_num("tfs_sound")>0) client_cmd(g_flasher,"spk sound/radio/bot/im_blind.wav")
      
      if(alpha == BLINDED_FULLY && get_cvar_num("tfs_adminchat")) server_cmd("amx_chat %s flashed a teammate (%s)",flasher,name)
   }
   
   return FMRES_IGNORED;
}

public colored_msg(id,msg[])
{
   message_begin(MSG_ONE, get_user_msgid("SayText"), {0,0,0}, id)
   write_byte(id)
   write_string(msg)
   message_end()
}

public reset_flasher()
{
   g_flasher = 0
   set_pev(task_mon,pev_nextthink,get_gametime() + 400.0)
}

public fw_setmodel(ent,const model[])
{
   if (!equal(model,"models/w_flashbang.mdl"))
      return FMRES_IGNORED;
   
   g_v_entity[ent] = pev(ent,pev_owner);
   
   return FMRES_IGNORED;
}

public fw_emitsound(ent,chan,const sound[])
{
   if (!pev_valid(ent))
      return FMRES_IGNORED;
   
   if (contain(sound, "flash") == -1)
      return FMRES_IGNORED;
   
   if (g_v_entity[ent] == 0)
      return FMRES_IGNORED;
   
   g_flasher = g_v_entity[ent]
   g_v_entity[ent] = 0;
   
   set_pev(task_mon,pev_nextthink,get_gametime() + 0.01)
   set_pev(task_mon,pev_iuser1,-1)
   
   return FMRES_IGNORED;
}


Un am folosit /* mesaj */ am anulat code-ul ca sa intalegi asa.

Eventual daca vrei ca nici mesajul "[Team Flash Snitch] Error!!! Problem with creating entities!" sa nu il mai primesti modifici
Code:
server_cmd("echo [Team Flash Snitch] Error!!! Problem with creating entities!")

cu
Code:
//server_cmd("echo [Team Flash Snitch] Error!!! Problem with creating entities!")


Bafta.

0 0
  
Back to top
View user's profile Send private message

  Topic locked


Topic is closed, you cannot post any messages in it anymore




 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Freakz Forum Index -> Trash Bin -> CS 2006-2019 (Archived) -> Resources  


The time now is 05-12-2024, 02:14:32
Copyright info

Based on phpBB ro/com
B

 
 
 







I forgot my password


This message appears only once, so
like us now until it's too late ! :D
x