VIP

Message
Autor
toulen
Příspěvky: 15
Registrován: 09 říj 2010, 18:12
Reputation: 0

VIP

#1 Příspěvekod toulen » 09 říj 2010, 18:13

dobr den potřeboval bych poradti nechci aby ve VIp byli ty vip skiny díky moc za radu a odpoved
Naposledy upravil(a) toulen dne 09 říj 2010, 19:18, celkem upraveno 1 x.

Uživatelský avatar
Qefik
Příspěvky: 5714
Registrován: 26 pro 2009, 11:26
Reputation: 0
Kontaktovat uživatele:

Re: VIP

#2 Příspěvekod Qefik » 09 říj 2010, 19:04

podívej se do popisu pluginu, někde tam by to mělo být. popřípadě uveď co máš za plugin, dej sem .sma soubor toho pluginu a podívám se ti na to
Rozdávat rady je zbytečné. Moudrý si poradí sám a hlupák stejně neposlechne.
Mark Twain

toulen
Příspěvky: 15
Registrován: 09 říj 2010, 18:12
Reputation: 0

Re: VIP

#3 Příspěvekod toulen » 09 říj 2010, 19:20

Kód: Vybrat vše

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "vipas"
#define PLUGIN_AUTHOR "Kukulis"
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}

public plugin_precache() {
precache_model("models/player/smith/smith.mdl")
precache_model("models/player/smith/smith.mdl")

return PLUGIN_CONTINUE
}

public resetModel(id, level, cid) {
if (get_user_flags(id) & ADMIN_CVAR) {
new CsTeams:userTeam = cs_get_user_team(id)
if (userTeam == CS_TEAM_T) {
cs_set_user_model(id, "smith")
}
else if(userTeam == CS_TEAM_CT) {
cs_set_user_model(id, "smith")
}
else {
cs_reset_user_model(id)
}
}

return PLUGIN_CONTINUE
}


public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "[VIP] Write /vip To see the VIP privileges.")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

   if (!cmd_access(id,level,cid,1))
   return PLUGIN_CONTINUE
   
   show_motd(id,"vip.txt","VIP by Kukulis")
   return PLUGIN_CONTINUE   
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

   fm_give_item(id, "item_assaultsuit");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_hegrenade");
   fm_give_item(id, "weapon_smokegrenade");
   cs_set_user_money(id, cs_get_user_money(id) + 500);
   set_user_gravity (id, 0.70);
}

public handle_say(id)
{
   new said[192]
   read_args(said,192)
   if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
      set_task(0.1,"print_viplist", id)
   return PLUGIN_CONTINUE
}

public print_viplist(user)
{
   new adminnames[33][32]
   new message[256]
   new contactinfo[256], contact[112]
   new id, count, x, len
   
   for(id = 1 ; id <= maxplayers ; id++)
      if(is_user_connected(id))
         if(get_user_flags(id) & ADMIN_CVAR)
            get_user_name(id, adminnames[count++], 31)

   len = format(message, 255, "%s Online VIP: ",COLOR)
   if(count > 0) {
      for(x = 0 ; x < count ; x++) {
         len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
         if(len > 96 ) {
            print_message(user, message)
            len = format(message, 255, "%s ",COLOR)
         }
      }
      print_message(user, message)
   }
   else {
      len += format(message[len], 255-len, "No online VIP.")
      print_message(user, message)
   }

   get_cvar_string("amx_contactinfo", contact, 63)
   if(contact[0])  {
      format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
      print_message(user, contactinfo)
   }
}

print_message(id, msg[])
{
   message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
   write_byte(id)
   write_string(msg)
   message_end()
}


//Mysteria: Kódy do Code ;)

Steel
Příspěvky: 43
Registrován: 03 zář 2011, 16:40
Reputation: 0
Kontaktovat uživatele:

Re: VIP

#4 Příspěvekod Steel » 05 zář 2011, 19:19

To si řekl tomu správnému člověku. Slíbil ti, že ti to udělá a skutek utekl protože pawnu nerozumí. Já ti proto po celém roce a jeden den ten plugin musím udělat podle tvých představ. Doufám, že to ještě alespon trošičku oceníš. Přitom, každý co sem již někdy díval do zdrojového klíče jakéhokoliv pluginu tak si stím musí poradit stačilo pouze odstanit funkci s s precache a podmínkami...

Kód: Vybrat vše

#include <amxmodx>
#include <fakemeta>
#include <fakemeta_util>
#include <hamsandwich>
#include <cstrike>
#include <amxmisc>
#include <fun>

#define PLUGIN_NAME "vipas"
#define PLUGIN_AUTHOR "Kukulis"
#define PLUGIN_VERSION "0.1"

static const COLOR[] = "^x04"
static const CONTACT[] = ""

new maxplayers
new gmsgSayText

public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_AUTHOR, PLUGIN_VERSION);

register_event("ResetHUD","event_reset_hud","be");
register_event("ResetHUD", "resetModel", "b")
register_clcmd("say /vip","admin_motd",0,"- Shows the MOTD.")

register_clcmd("say", "handle_say")
register_cvar("amx_contactinfo", CONTACT, FCVAR_SERVER)
gmsgSayText = get_user_msgid("SayText")

maxplayers = get_maxplayers()

return PLUGIN_CONTINUE

}
public event_reset_hud(id)
{
if(!is_user_connected(id))
return PLUGIN_CONTINUE;

client_print(id, print_chat, "[VIP] Write /vip To see the VIP privileges.")

if(!access(id,ADMIN_CVAR))
return PLUGIN_CONTINUE;

set_task(1.0,"give_stuff",id);

return PLUGIN_CONTINUE;
}

public admin_motd(id,level,cid) {

   if (!cmd_access(id,level,cid,1))
   return PLUGIN_CONTINUE
   
   show_motd(id,"vip.txt","VIP by Kukulis")
   return PLUGIN_CONTINUE   
}




public give_stuff(id)
{
if(!is_user_connected(id))
return;

   fm_give_item(id, "item_assaultsuit");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_flashbang");
   fm_give_item(id, "weapon_hegrenade");
   fm_give_item(id, "weapon_smokegrenade");
   cs_set_user_money(id, cs_get_user_money(id) + 500);
   set_user_gravity (id, 0.70);
}

public handle_say(id)
{
   new said[192]
   read_args(said,192)
   if(( containi(said, "who") != -1 && containi(said, "admin") != -1) || contain(said, "/vips") != -1)
      set_task(0.1,"print_viplist", id)
   return PLUGIN_CONTINUE
}

public print_viplist(user)
{
   new adminnames[33][32]
   new message[256]
   new contactinfo[256], contact[112]
   new id, count, x, len
   
   for(id = 1 ; id <= maxplayers ; id++)
      if(is_user_connected(id))
         if(get_user_flags(id) & ADMIN_CVAR)
            get_user_name(id, adminnames[count++], 31)

   len = format(message, 255, "%s Online VIP: ",COLOR)
   if(count > 0) {
      for(x = 0 ; x < count ; x++) {
         len += format(message[len], 255-len, "%s%s ", adminnames[x], x < (count-1) ? ", ":"")
         if(len > 96 ) {
            print_message(user, message)
            len = format(message, 255, "%s ",COLOR)
         }
      }
      print_message(user, message)
   }
   else {
      len += format(message[len], 255-len, "No online VIP.")
      print_message(user, message)
   }

   get_cvar_string("amx_contactinfo", contact, 63)
   if(contact[0])  {
      format(contactinfo, 111, "%s Contact Server Admin -- %s", COLOR, contact)
      print_message(user, contactinfo)
   }
}

print_message(id, msg[])
{
   message_begin(MSG_ONE, gmsgSayText, {0,0,0}, id)
   write_byte(id)
   write_string(msg)
   message_end()
}
Obrázek

Uživatelský avatar
Mysteria
Příspěvky: 9122
Registrován: 26 pro 2009, 15:40
Reputation: 7
Bydliště: Česká republika
Kontaktovat uživatele:

Re: VIP

#5 Příspěvekod Mysteria » 05 zář 2011, 20:04

Můžeš mi Steele prosím vysvětlit, proč oživuješ skoro rok staré témata (09 říj 2010, 19:20), myslíš, že to ještě bude potřebovat? Trošku uvažuj prosím, než něco napíšeš.

Steel
Příspěvky: 43
Registrován: 03 zář 2011, 16:40
Reputation: 0
Kontaktovat uživatele:

Re: VIP

#6 Příspěvekod Steel » 05 zář 2011, 21:21

Co ty víš... VIP plugin schání každý druhý. Napíše do vyhledávače VIP a vida najde mnou upravenej plugin přesně jak ho měl myslim dopředu, Vaše db to přežije furt lepší než váš způsob starých topiců. Kdybyste udělaly koš a staré témata tam přesouvaly docela by vám to proslělo hlavně webu.
Obrázek

Uživatelský avatar
Mysteria
Příspěvky: 9122
Registrován: 26 pro 2009, 15:40
Reputation: 7
Bydliště: Česká republika
Kontaktovat uživatele:

Re: VIP

#7 Příspěvekod Mysteria » 05 zář 2011, 21:33

Prostě jak už ti psal Qefik, přestaň obnovovat stará témata.


Zpět na „AMX mod X“

Kdo je online

Uživatelé prohlížející si toto fórum: Žádní registrovaní uživatelé a 9 hostů