Hallo liebe Breadfisher,
Ich habe da ein Problem und zwar will ich ein Gamemode mit mysql zum laufen bringen.
Wie man mit Mysql Connected weiss ich ja doch leider habe ich noch nicht die erfahrung mit mysql die tabellen zu schreiben.
Ich habe jetzt aus meinem Gamemode unter public OnPlayerLogin
ein paar mysql formate kopiert.
format(query,sizeof(query),"SELECT Level FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pLevel] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT AdminLevel FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pAdmin] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT DonateRank FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pDonateRank] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Registered FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pRegistered] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Tutorial FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pTut] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Sex FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pSex] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Age FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pAge] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Experience FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pExp] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Money FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pCash] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Gun1 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pGun1] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Gun2 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pGun2] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Gun3 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pGun3] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Gun4 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pGun4] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Ammo1 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pAmmo1] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Ammo2 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
mysql_store_result();
PlayerInfo[playerid][pAmmo2] = mysql_fetch_int();
mysql_free_result();
format(query,sizeof(query),"SELECT Ammo3 FROM `user` WHERE Name = '%s' LIMIT 1",pName);
mysql_query(query);
Weiss einer wie ich das dann bei PhpMyAdmin schreiben soll mit den tabellen?
Ich würde mich wirklich sehr freuen!man kann mir auch per Teamviewer helfen Pn melden.