AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   how to add stuff to a .txt (https://forums.alliedmods.net/showthread.php?t=63132)

Reaper2331 11-12-2007 18:49

how to add stuff to a .txt
 
ok, guys i want to make a plugin so when someone types a cmd(of the plugin im makin) it will make a .txt in their mod/name of plugin folder

example:
cstrike/playerhelper

how would i do this?

the txt i would like to be like


--------------------------------Map name------------------------------
Info
-------------------------------Player Name------------------------------

M249-M4A1 11-12-2007 19:09

Re: how to add stuff to a .txt
 
log_to_file() in the procedure?

Reaper2331 11-12-2007 19:21

Re: how to add stuff to a .txt
 
ok, but how would i go on about adding the format i want?

YamiKaitou 11-12-2007 19:23

Re: how to add stuff to a .txt
 
Simple write_file ( http://amxmodx.org/funcwiki.php?go=func&id=88 )

Or, you can use one of the many file commands from C/C++ ( http://amxmodx.org/funcwiki.php?go=inc&id=3 )

Arkshine 11-12-2007 23:07

Re: how to add stuff to a .txt
 
It's better to use the f_* native, (c-style).

fopen, fwrite*, fput*, etc...

Wilson [29th ID] 11-13-2007 03:23

Re: how to add stuff to a .txt
 
You cannot write a file on the client's computer though, which is what it seems like he's asking in his first post.

If you could do that, it'd be way too easy to create viri on clients'


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

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