AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Read & print in html (https://forums.alliedmods.net/showthread.php?t=88000)

One 03-19-2009 06:51

Read & print in html
 
How to add cfg file & read lines there & edit the lines? :)) example :

read from hi.ini

PHP Code:

"hi" "www.hi.com 

scan file & write in motd :

hi

( so there will be add this code : <p><a href="http://www.hi.com">hi</a></p> )

i think anything like this :

("<p><a href="%d">%d</a></p>", name, link) .

but how to have more then 1000 of this lines?so that we could add around 1000 "hi" "www.hi.com"in the file? so that our file could show so :
PHP Code:

"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com"
"hi" "www.hi.com" 

motd shows :
hi
hi
hi
hi
hi
hi
hi
hi
hi

fysiks 03-19-2009 07:47

Re: Read & print in html
 
Code:

new motd[2048]
new len = 0
Loop:
    Get "name" and "link".
    len += format(motd[len],2047-len,"<p><a href=^"%s^">%s</a></p>", link, name)
EndLoop;



All times are GMT -4. The time now is 08:54.

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