Setare la kick name

Discutii legate de instalarea, configurarea si modificarea unui server de Counter-Strike.

Moderators: Moderatori ajutatori, Moderatori, Echipa eXtreamCS.com

Post Reply
User avatar
7sorel
Membru, skill +1
Membru, skill +1
Posts: 164
Joined: 05 Apr 2011, 21:18
Detinator Steam: Nu
CS Status: :X
Location: Bucuresti
Has thanked: 7 times
Been thanked: 1 time
Contact:

31 May 2011, 22:48

Cum mai adaug si eu in afara de @ #%^... etc 12345678910
!@~`#$%^&*()_+-={}[]\|;:'",<.>/? si semnele astea

Code: Select all

#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <fun>

#define adtime    600.0 //Default of 10 minuites

new pcvar_Advertise
new pcvar_Display

public plugin_init()
{
   register_plugin("Reset Score", "1.0", "Silenttt")
   
   //You may type /resetscore or /restartscore
   register_clcmd("say /rs", "reset_score")
   register_clcmd(" /restartscore", "reset_score")
   register_clcmd(" /retry", "reset_score")
   
   //This command by default will be set at 0
   //Change it to 1 in server.cfg if you want
   //A message to be shown to advertise this.
   pcvar_Advertise = register_cvar("sv_rsadvertise", "0")
   //This command by default is also 0
   //Change it to 1 in server.cfg if you want
   //It to show who reset their scores when they do it
   pcvar_Display = register_cvar("sv_rsdisplay", "0")
   
   if(get_cvar_num("sv_rsadvertise") == 1)
   {
      set_task(adtime, "advertise", _, _, _, "b")
   }
}

public reset_score ( id )
{
   //These both NEED to be done twice, otherwise your frags wont
   //until the next round
   cs_set_user_deaths(id, 0)
   set_user_frags(id, 0)
   cs_set_user_deaths(id, 0)
   set_user_frags(id, 0)
   
   if(get_pcvar_num(pcvar_Display) == 1)
   {
      new name[33]
      get_user_name(id, name, 32)
      client_print(0, print_chat, "%s Si-a resetat scorul !", name)
   }
   else
   {
      print ( id, "^x04 [INFO] ^x03 Scorul tau a fost resetat." );
   }
}

public advertise ( )
{
   set_hudmessage(255, 0, 0, -1.0, 0.20, 0, 0.2, 12.0)
   show_hudmessage(0, "Scrie in chat /resetscore pentru ati reseta scorul !")
}

public client_putinserver ( id )
{
   if(get_pcvar_num(pcvar_Advertise) == 1)
   {
      set_task(10.0, "connectmessage", id, _, _, "a", 1)
   }
}

public connectmessage ( id )
{
   if(is_user_connected(id))
   {
   client_print(id, print_chat, "Scrie in chat /resetscore pentru ati reseta scorul ! (rather than reconnecting)")
   }
}

print ( id, const message[], {Float,Sql,Result,_}:... )
{
   new Buffer[128],Buffer2[128]
   new players[32], index, num, i

   formatex(Buffer2, sizeof Buffer2 - 1, "%s",message)
   vformat(Buffer, sizeof Buffer - 1, Buffer2, 3)
   get_players(players, num,"c")

   if(id)
   {
      message_begin(MSG_ONE,get_user_msgid("SayText"),_,id)
      write_byte(id)
      write_string(Buffer)
      message_end()
   }
   else
   {
      for( i = 0; i < num;i++ )
      {
         index = players[i]
         if( !is_user_connected(index)) continue;

         message_begin(MSG_ONE,get_user_msgid("SayText"),_,index)
         write_byte(index)
         write_string( Buffer )
         message_end()
      }
   }
}
Image



Image
RoyalServer 2
User avatar
SPLAT
Membru eXtream
Membru eXtream
Posts: 2407
Joined: 09 Jul 2010, 18:39
Detinator Steam: Da
Reputatie: Fost moderator
Membru Club eXtreamCS (3 luni)
Locul 2 la Cupa eXtreamCS 2014 (Counter Strike)
Location: Constanța
Has thanked: 300 times
Been thanked: 286 times

01 Jun 2011, 23:44

Ce ai pus tu aici cred ca-i sursa plugin-ului resetscore ... :))
Post Reply

Return to “Probleme la servere dedicate de Counter-Strike”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 125 guests