User Control Panel using Y_INI
#1

I was wondering, I'm using ******'s y_ini and I need to make a User Control Panel for my gamemode using YSI's easy PHP function, but I don't exactly know how to, and it's 100% possible to make a UCP through y_ini and y_php.
Reply
#2

I think, using fopen() will be possible for this.
Reply
#3

This is a very bad idea.
Stop using INI as your player database.S

Switch over to MySQL and making an UCP will get easier.
Reply
#4

You dont use y_php.
y_php is AFAIK too call php functions and receive info from them... Meaning you can create the whole gamemode API in PHP and call them in the gamemode which will provide more abilites that aren't in PAWN.. aguess.

About reading ini files.
In YSI 3.1, There is a folder called "php".
Open it, You will find a file called "ysi_ini.php".

That will contain a class for reading the ini files created by y_ini.

However to do such a thing, Your site must be hosted in the same server as the SAMP server do its able to access the user's files.

__________________________________________

And if your gamemode is still at its beginning, I highly recommend that you switch to MySQL, It is alot better in many things.
As if your gamemode gets bigger, Converting will get harder and you will definitely need that convert in the future.. So why not from now ?
Reply
#5

I would try to load everything from an ini file with this:
http://php.net/manual/en/function.parse-ini-file.php
and then just print the results on the page.
Reply
#6

Quote:
Originally Posted by dominik523
Посмотреть сообщение
I would try to load everything from an ini file with this:
http://php.net/manual/en/function.parse-ini-file.php
and then just print the results on the page.
Tried this ones before and it fucks up when there is a php keyword in the INI.
The only way to use that is to modify y_ini to add double quotation marks in strings.. Which wouldn't really be hard to add.

Or just use the API that ****** created.
Reply
#7

Quote:
Originally Posted by Ahmad45123
Посмотреть сообщение
You dont use y_php.
y_php is AFAIK too call php functions and receive info from them... Meaning you can create the whole gamemode API in PHP and call them in the gamemode which will provide more abilites that aren't in PAWN.. aguess.

About reading ini files.
In YSI 3.1, There is a folder called "php".
Open it, You will find a file called "ysi_ini.php".

That will contain a class for reading the ini files created by y_ini.

However to do such a thing, Your site must be hosted in the same server as the SAMP server do its able to access the user's files.

__________________________________________

And if your gamemode is still at its beginning, I highly recommend that you switch to MySQL, It is alot better in many things.
As if your gamemode gets bigger, Converting will get harder and you will definitely need that convert in the future.. So why not from now ?
This is the exact response I wanted! Thank you so much!
http://php.net/manual/en/function.parse-ini-file.php <-- This should also help!
Reply
#8

Quote:
Originally Posted by Yashas
Посмотреть сообщение
This is a very bad idea.
Stop using INI as your player database.S

Switch over to MySQL and making an UCP will get easier.
Y_INI is not a bad idea for using a player database! It's easier to script in INI too!
Not to mention, people are too used to using MySQL as a database, not knowing the capabilities YSI's y_ini has.
Reply
#9

Quote:
Originally Posted by ChromeAmazing
Посмотреть сообщение
Y_INI is not a bad idea for using a player database! It's easier to script in INI too!
Not to mention, people are too used to using MySQL as a database, not knowing the capabilities YSI's y_ini has.
Sorry for this bump.. But can you please give me atleast one example of why you prefer INI then sql ?
What capabilities does ini has then sql ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)