View Single Post
matrix123
Veteran Member
Join Date: Feb 2011
Old 04-08-2012 , 15:04   Re: AYUDA CON plugin anti nick flood
#19

Code:
#include <amxmodx> #include <fakemeta> #define PLUGIN "No Name Change" #define VERSION "1.0" #define AUTHOR "matrix O_o" new Number[33] public plugin_init() {     register_plugin("PLUGIN","VERSION","AUTHOR")     register_forward(FM_ClientUserInfoChanged, "fwdCliUserInfoChanged")     register_event("HLTV","event_r","a","1=0","2=0") } public client_putinserver(id) {     Number[id] = 0 } public event_r() {     for(new i = 1; i <= get_maxplayers(); i++)     {         Number[i] = 0     } } public fwdCliUserInfoChanged(id, buffer) {     if(!is_user_connected(id))         return FMRES_IGNORED;         new szNewName[32], szOldName[32];     get_user_name(id, szOldName, charsmax(szOldName))     engfunc(EngFunc_InfoKeyValue, buffer, "name", szNewName, charsmax(szNewName))         if(equal(szNewName, szOldName))         return FMRES_IGNORED;             if(Number[id] == 5)     {         if(!(get_user_flags(id) & ADMIN_CVAR))         {                     engfunc(EngFunc_SetClientKeyValue, id, buffer, "name", szOldName)             client_cmd(id, "name ^"%s^"; setinfo name ^"%s^"", szOldName, szOldName)             client_print(id, print_chat, "El cambio de nick esta bloqueado.")             return FMRES_SUPERCEDE;         }     }     Number[id]++     return FMRES_IGNORED; }


en el ultimo plugin que te dejaron no crearon la variable con 33 celdas, no usan los id en algunas partes por eso no compila xD este testeado y funciona (:
__________________
matrix123 is offline