User
Pass
2FA
 
 

[REZOLVAT] Kick_Name

 
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) -> Plugins - Help / Support
Author Message1768
DANNY*

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 22-07-2017, 10:45:00 | Translate post to: ... (Click for more languages)

»Nume*: Kick_Name
»Descriere problema*: Cvarul este pus la 10 schimbari sa dea kick. Dar daca il schimb de 4 ori imi da kick.
»Poze/Sma:



Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "name flood"
#define VERSION "0.1"
#define AUTHOR "camper"

#pragma semicolon 1

new ct[33], Float:start_time[33], nft;

public plugin_init()
{
   register_plugin(PLUGIN, VERSION, AUTHOR);
   nft = register_cvar("amx_name_flood_time", "10");
}

public client_putinserver(id)
{
   ct[id]=0;
   start_time[id]=0.0;
}

public client_infochanged(id)
{
   new newname[32], oldname[32];
   get_user_info(id, "name", newname,31);
   get_user_name(id, oldname, 31);
     
   if(equal(newname, oldname))
      return PLUGIN_HANDLED;
   else
   {   
      reset:
      if(ct[id]==0)
      {
         start_time[id] = get_gametime();
         ct[id]++;
      }
      else
      {
         if(get_gametime() - start_time[id] < get_pcvar_num(nft))
            ct[id]++;
         else
         {   
            ct[id]=0;
            goto reset;
         }
      }
     
      if(ct[id]==3)
      {
         client_print(id, print_chat, "*** Nick change flood! Stop or you will be kicked! ***");
         client_print(id, print_chat, "*** Nick change flood! Stop or you will be kicked! ***");
      }
     
      if(ct[id]==4)
      {
         if( (get_gametime() - start_time[id]) < get_pcvar_num(nft))
         {
            ct[id]=0;
            server_cmd("kick #%d ^"%s^"", get_user_userid(id), "Kicked due to name change flood.");
            return PLUGIN_HANDLED;
         }
         else
         {
            ct[id]=0;
            goto reset;
         }
      }
   }
   return PLUGIN_HANDLED;
}

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

[Inactiv o perioada]



Status: Offline
(since 09-11-2017 19:29)
Joined: 18 Feb 2017
Posts: 638, Topics: 28
Location: Romania

Reputation: 762.7
Votes: 40

       
Post Posted: 22-07-2017, 10:50:56 | Translate post to: ... (Click for more languages)

Spoiler:


Regulament|My Official Website[V:1.1]|Panel JB[V:1.0]

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

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 22-07-2017, 11:14:55 | Translate post to: ... (Click for more languages)

Am schimbat si de 20 de ori si tot nu am primit kick .
0 0
  
Back to top
View user's profile Send private message
GoreSpintecatoru.

[Inactiv o perioada]



Status: Offline
(since 09-11-2017 19:29)
Joined: 18 Feb 2017
Posts: 638, Topics: 28
Location: Romania

Reputation: 762.7
Votes: 40

       
Post Posted: 22-07-2017, 11:26:12 | Translate post to: ... (Click for more languages)

Spoiler:


Regulament|My Official Website[V:1.1]|Panel JB[V:1.0]

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

[DEV]



Status: Offline
(since 12-03-2020 22:13)
Joined: 24 May 2014
Posts: 4042, Topics: 119
Location: ---------

Reputation: 515.9
Votes: 118

   
Post Posted: 22-07-2017, 12:23:04 | Translate post to: ... (Click for more languages)

Problema e aici if(ct[id]==4) pune if(ct[id] == 10), 10 reprezinta timpul in care se numara adica daca el isi schimba numele acum il poate schimba iar in 10 secunde fara sa fie penalizat


Retired from Amxmodx

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

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 22-07-2017, 21:48:45 | Translate post to: ... (Click for more languages)

Gore, nu merge.

destoi112 eu nu gasesc linia 'if(ct[id]==4) pune if(ct[id] == 10)" in sursa .

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

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 25-07-2017, 19:45:00 | Translate post to: ... (Click for more languages)

Scz. Am gasit linia aia. Am inlocuit dar tot nu merge .
0 0
  
Back to top
View user's profile Send private message
DANNY*

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 06-08-2017, 17:03:50 | Translate post to: ... (Click for more languages)

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

[Mentally Stable]



Status: Offline
(since 03-10-2019 20:59)
Joined: 13 Jan 2017
Posts: 142, Topics: 7
Location: Polovragi, GJ

Reputation: 15.4
Votes: 17

     
Post Posted: 08-08-2017, 17:42:20 | Translate post to: ... (Click for more languages)

Gresit. Cvarul nu este pus ca la un anumit numar de schimbari de nume sa dea kick, cvarul este pus pe 10, adica daca jucatorul isi schimba numele in mai putin de 10 secunde, la a 4-a schimbare de nume sa-i dea kick. Ti-am mai adaugat eu un cvar din care setezi la cate schimbari de nick sa dea kick.
Poftim:
Spoiler:


Compileaza-l si pune-l pe asta.
Am optimizat si codul putin.


Be the one, not anyone.
Currently working on Zombie Legendary 8.1


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

[Mentally Stable]



Status: Offline
(since 26-04-2018 11:28)
Joined: 08 Feb 2017
Posts: 161, Topics: 28
Location: Romania

Reputation: 26.7
Votes: 1

Post Posted: 08-08-2017, 22:34:18 | Translate post to: ... (Click for more languages)

Multumesc foarte mult legendary. Merge perfect. Cer T/C
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

Locked by GoreSpintecatoru., 09 August 2017 06:56



 
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) -> Plugins - Help / Support  


The time now is 29-03-2024, 09:41:03
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