Raised This Month: $ Target: $400
 0% 

how to set one id


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Porta0123
Member
Join Date: Apr 2014
Location: Spain
Old 07-08-2014 , 14:39   Re: how to set one id
Reply With Quote #10

i want do the same than Cod-Mod ...

its register the plugin whitout add it in plugins.ini
this will works?
Code:
public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     //registrar clases     new Path[256];     get_configsdir(Path, charsmax(Path));     formatex(Path, charsmax(Path),"%s/%s", Path, gFileName);         if(!file_exists(Path))     {         client_print(0, print_chat, "[NeoDeathMatch] El archivo %s no existe", gFileName);         return PLUGIN_HANDLED;     }             new f = fopen(Path, "rt");             new iName[ITEMSLEN+1];       new Item;           while(!feof(f))     {         fgets(f, iName, charsmax(iName));                 if(!iName[0] || iName[0] == ';'         || iName[0] == '/' && iName[1] == '/' ) continue;                   copy(gItems[Item], charsmax(gItems), iName);           Item++;                                                         if(Item >= Cid) break;                 new plugin_id = find_plugin_byfile(iName) // Tira -1 si no lo encuentra.         new forwards_id, null_id;         if( plugin_id == INVALID_PLUGIN_ID )         {                         return log_error(AMX_ERR_NOTFOUND, "Plugin no encontrado")         }         else         {             forwards_id = CreateOneForward(plugin_id, "plugin_init", FP_CELL, FP_STRING)                         if( forwards_id < 0 )             {                 return log_error(AMX_ERR_NATIVE, "Error Creando Forward")             }             else             {             if( !ExecuteForward(forwards_id, null_id) )             {                 return log_error(AMX_ERR_NATIVE, "Error executando Forward")             }             else             {                 DestroyForward(forwards_id);             }             }         }         return 1                 }     fclose(f);     return 1 }

Last edited by Porta0123; 07-08-2014 at 14:40.
Porta0123 is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode