Show Button Pressed

In jos

descarca Show Button Pressed

Mesaj Scris de CelRau la data de Sam Noi 26, 2016 10:52 am

Descriere: Arata cine a apasat pe un buton.

Descarcare: MediaFire

Nume: Show Button Pressed
Versiune: 1.0
Link oficial: ExtreamCS
Sursa:
Cod:
/* Plugin generated by AMXX-Studio */

#include <amxmodx>
#include <engine>
#include <hamsandwich>

#define PLUGIN "[ZP] Plugin: Show Button Pressed"
#define VERSION "1.0"
#define AUTHOR "[P]erfec[T] [S]cr[@]s[H]"

new anti_flood_last_ent[33]

public plugin_init() {
   register_plugin(PLUGIN, VERSION, AUTHOR)
   
   RegisterHam(Ham_Use, "func_button", "fw_UseStationary")
   RegisterHam(Ham_Use, "func_rot_button", "fw_UseStationary")
}

public fw_UseStationary(entity, caller, activator, use_type)
{
   if(anti_flood_last_ent[caller] == entity)
      return HAM_IGNORED
   
   static class[32]
   static name[32]; get_user_name(caller, name, 31);
   entity_get_string(entity, EV_SZ_targetname, class, 31) // ta target pra ver o nome do botao

   if(!class[0])
      entity_get_string(entity, EV_SZ_target, class, 31)
      
   client_printcolor(0, "!g[ZE] !t%s!y Press the Button !t'%s'", name, class)

   anti_flood_last_ent[caller] = entity
   remove_task(caller)
   set_task(3.0, "anti_flood_reset", caller)

   return HAM_IGNORED
}

public anti_flood_reset(id) anti_flood_last_ent[id] = 0

stock client_printcolor(const id,const input[], any:...)
{
   new msg[191], players[32], count = 1; vformat(msg,190,input,3);
   replace_all(msg,190,"!g","^4");    // green
   replace_all(msg,190,"!y","^1");    // normal
   replace_all(msg,190,"!t","^3");    // team
   
   if (id) players[0] = id; else get_players(players,count,"ch");
   
   for (new i=0;i<count;i++)
   {
      if (is_user_connected(players[i]))
      {
         message_begin(MSG_ONE_UNRELIABLE,get_user_msgid("SayText"),_,players[i]);
         write_byte(players[i]);
         write_string(msg);
         message_end();
      }
   }
}

Instalare:
1. Fisierul show_button_pressed.sma il puneti in addons/amxmodx/scripting
2. Fisierul show_button_pressed.amxx il puneti in addons/amxmodx/plugins
3. Intrati in fisierul addons/amxmodx/configs/plugins.ini si adaugati la urma:
Cod:
show_button_pressed.amxx

Cvar-uri (se adauga in fisierul amxmodx\configs\amxx.cfg): -


Comenzi administrative (se tasteaza in consola si trebuie sa fiti administrator): -


Comenzi publice (se tasteaza in joc prin apasarea tastei Y): -


Module necesare (se sterge ; din fata modulului de mai jos; acestea le gasiti in fisierul amxmodx\configs\modules.ini):

- engine
- hamsandwich


Imagini:
avatar
CelRau
Registered user
Registered user

Mesaje : 184
Data de inscriere : 26/11/2016

Sus In jos

Sus


 
Permisiunile acestui forum:
Nu puteti raspunde la subiectele acestui forum