24.06.2018, 17:40
Which version of MySQL are you using? Here are the wiki for R33+ and R40+:
www.wiki.sa-mp.com/wiki/MySQL/R33 - R33+
www.wiki.sa-mp.com/wiki/MySQL/R40 - R40+
The function is not MySQLConnect(), but its mysql_connect in every version with other parameters. You can find all information in it. If you are using older version than R33, then I'd say you upgrade it because older ones arent supported here.
For the PlayerInfo problem, you will have to create a enum, pInfo, which is then accessed using an array which is PlayerInfo in your case.
for example:
After doing that, you can use the variables you declared inside the enum along with PlayerInfo, like to set the cash,
Also, you will have to save/load into MySQL for it to work. Simply connecting it wont work. I'd suggest you to follow tutorials on the forums. (Search for them)
www.wiki.sa-mp.com/wiki/MySQL/R33 - R33+
www.wiki.sa-mp.com/wiki/MySQL/R40 - R40+
The function is not MySQLConnect(), but its mysql_connect in every version with other parameters. You can find all information in it. If you are using older version than R33, then I'd say you upgrade it because older ones arent supported here.
For the PlayerInfo problem, you will have to create a enum, pInfo, which is then accessed using an array which is PlayerInfo in your case.
for example:
PHP код:
enum pInfo
{
Level,
Cash,
Bank
};
new PlayerInfo[MAX_PLAYERS][pInfo];
PHP код:
PlayerInfo[playerid][Cash] = 500;