Raised This Month: $ Target: $400
 0% 

Replacing %s on file with player name


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
thEsp
BANNED
Join Date: Aug 2017
Old 07-02-2018 , 08:12   Re: Replacing %s on file with player name
Reply With Quote #1

Quote:
Originally Posted by maqi View Post
Are we supposed to read minds ?

He showed us one line of code without any context
new szText[64], len
format(szText, 63, dir)
read_file(dir,0,szText,63,len)

new player[32]
get_user_name(id,player,32)

Last edited by thEsp; 02-23-2019 at 16:11.
thEsp is offline
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-02-2018 , 08:24   Re: Replacing %s on file with player name
Reply With Quote #2

If you want help in different thing then make another topic.
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-02-2018 at 08:27.
Ghosted is offline
Old 07-02-2018, 08:28
thEsp
This message has been deleted by thEsp.
Ghosted
Veteran Member
Join Date: Apr 2015
Location: Georgia
Old 07-02-2018 , 08:30   Re: Replacing %s on file with player name
Reply With Quote #4

Quote:
Originally Posted by thEsp View Post
I fixed that without help of anyone ,and I need something that is similiar -_-
Thats why
If you want to get length of file (= size in bytes) then you should use fseek (use fopen before this)

-----

new File = fopen(<filename>, "rt");

fseek(File, 0, SEEK_END)
new TotalBytes = ftell(File);
//fseek(DataFile, 0L, SEEK_SET);
fclose(File);
__________________

[MOD] CS Weapon Mod V1.7.1
[MM] MetaMod-C V1.0
[MOD] CS NPC Mod (5%)


Probably Left AM

Last edited by Ghosted; 07-02-2018 at 08:32.
Ghosted is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-02-2018 , 21:53   Re: Replacing %s on file with player name
Reply With Quote #5

Quote:
Originally Posted by thEsp View Post
I fixed that without help of anyone ,and I need something that is similiar -_-
Thats why
Getting the size of a file is in no way related to formatting strings. Always post new questions in new threads. It makes it much easier for future users to find answers.
__________________
fysiks is offline
maqi
Senior Member
Join Date: Apr 2017
Location: Serbia
Old 07-02-2018 , 08:51   Re: Replacing %s on file with player name
Reply With Quote #6

Quote:
Originally Posted by thEsp View Post

... And dont be mad serbian E-KID
Help yourself next time
__________________
stuff

Last edited by maqi; 07-02-2018 at 08:52.
maqi is offline
Reply



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 12:43.


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