Problem with a variable and others.
#3

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:

PHP код:
enum pInfo
{
    
Level,
    
Cash,
    
Bank
};
new 
PlayerInfo[MAX_PLAYERS][pInfo]; 
After doing that, you can use the variables you declared inside the enum along with PlayerInfo, like to set the cash,
PHP код:
 PlayerInfo[playerid][Cash] = 500
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)
Reply


Messages In This Thread
Problem with a variable and others. - by Longover - 24.06.2018, 14:41
Re: Problem with a variable and others. - by Verc - 24.06.2018, 14:57
Re: Problem with a variable and others. - by GTLS - 24.06.2018, 17:40

Forum Jump:


Users browsing this thread: 2 Guest(s)