Raised This Month: $ Target: $400
 0% 

How can i save and load a string?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Alucard^
AMXX Moderator: Others
Join Date: Sep 2007
Location: Street
Old 06-07-2010 , 19:40   Re: How can i save and load a string?
Reply With Quote #6

Code:
#include <amxmodx> #define PLUGIN  "New Plugin" #define AUTHOR  "Alucard" #define VERSION "0.0.1" new String1[] = "hey yo, whats up"; new String2[] = "i am a little turtle"; public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR);         register_clcmd("say /save", "HookCmdSave");     register_clcmd("say /load", "HookCmdLoad"); } public HookCmdSave(id) {     new szText[192];     formatex(szText, 191, "^"%s^" ^"%s^"", String1, String2);         write_file(file[], szText);     return PLUGIN_HANDLED; } public HookCmdLoad(id) {     new szText[192], var1[64], var2[64], iLine, iLen;         while(read_file(file[], iLine++, szText, 191, iLen) )     {         parse(szText, var1, 63, var2, 63);         break;     }         client_print(id, print_chat, "%s", var1);     client_print(id, print_chat, "%s", var2);         return PLUGIN_HANDLED; }

Is just an example, need more code...

Sry for not use fvault, nvault or whatever, i never read nothing about that things.
__________________
Approved Plugins - Steam Profile

Public non-terminated projects:
All Admins Menu, HLTV parameters, Subnick,
Second Password (cool style), InfoZone,
Binary C4 plant/defuse, and more...

Private projects:
NoSpec (+menu), NV Surf Management,
PM Adanved System, KZ longjump2, and more...
Alucard^ is offline
Send a message via Skype™ to Alucard^
 



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 05:15.


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