Raised This Month: $ Target: $400
 0% 

Read from .txt file anywhere?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jonatat
Senior Member
Join Date: Dec 2017
Old 04-20-2021 , 01:44   Read from .txt file anywhere?
Reply With Quote #1

Hello guys. Im tryingo todo to read .txt file in anywhere. My code:

PHP Code:
stock GetMatchID()
{
new 
fp fopen("addons/amxmodx/configs/gunid.txt"), gettheid[100];
while (!
foef(fp));
{
new 
showmatchid fgets(fpgettheidcharsmax(gettheid);
return 
gettheid;
}
fclose(fp)

But getting error then compiling. Why i'm using stock? I want to show the ID anywhere where i put %s. Example:

PHP Code:
client_printcolor(0"Gun ID is now: %s"GetMatchID

Last edited by jonatat; 04-20-2021 at 02:19.
jonatat 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 02:38.


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