SA-MP Forums Archive
Is it possible to get a pawn variable value in HTML? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Is it possible to get a pawn variable value in HTML? (/showthread.php?tid=653903)



Is it possible to get a pawn variable value in HTML? - SeanDenZYR - 16.05.2018

ey' so, i was wondering if i could get values from

Код:
enum pData {
bla,
blabla,
baas90da7nd,
};

PlayerData[MAX_PLAYERS][pData];
^ this, in HTML? If yes, please tell me how, i'm trying to learn HTML/PHP/JS.


Re: Is it possible to get a pawn variable value in HTML? - GTLS - 16.05.2018

No. You can not directly pass Pawn variable into HTML. That is why people use MySQL or SQLite Database. A same database is accessible by Pawn and your HTML pages.


Re: Is it possible to get a pawn variable value in HTML? - SeanDenZYR - 16.05.2018

Hmm, how about a value from a .ini or text file, is it possible?


Re: Is it possible to get a pawn variable value in HTML? - JasonRiggs - 16.05.2018

Quote:
Originally Posted by SeanDenZYR
Посмотреть сообщение
Hmm, how about a value from a .ini or text file, is it possible?
Actually not, Because the INI files are not using anything related to HTML, but it's a normal saving to a file, So it's not.


Re: Is it possible to get a pawn variable value in HTML? - CodeStyle175 - 16.05.2018

you have to add mysql database, what is used by gamemode and your webpage.
and user logs in and sees his stats


Re: Is it possible to get a pawn variable value in HTML? - Gforcez - 16.05.2018

You can read out ini files with Javascript, search on a search engine how to read out files with JavaScript and maybe you find what you need.


Re: Is it possible to get a pawn variable value in HTML? - CodeStyle175 - 16.05.2018

thats stupid thing to do when you want to make good server


Re: Is it possible to get a pawn variable value in HTML? - SeanDenZYR - 16.05.2018

Quote:
Originally Posted by CodeStyle175
Посмотреть сообщение
thats stupid thing to do when you want to make good server
i'm just asking, i'm not gonna make a user control panel or something.


Re: Is it possible to get a pawn variable value in HTML? - CodeStyle175 - 16.05.2018

well its possible, because you can send http request with samp the sameway as webpage does and then you can save it to ini file, but its very slow way to save anything.