C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(329) : error 017: undefined symbol "mysql_query"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(352) : error 017: undefined symbol "mysql_query"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(363) : error 017: undefined symbol "mysql_query"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(372) : error 017: undefined symbol "mysql_query"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(400) : error 017: undefined symbol "mysql_query"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(402) : error 017: undefined symbol "mysql_fetch_int"
C:\Users\Lukas\Desktop\PAWNO\gamemodes\Untitled.pwn(443) : error 017: undefined symbol "mysql_query"
stock mysql_SetInt(Table[], Field[], To, Where[], Where2[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Where2, Where2);
format(query, 128, "UPDATE `%s` SET `%s` = '%d' WHERE `%s` = '%s'", Table, Field, To, Where, Where2);
mysql_query(query);
return true;
}
stock mysql_SetString(Table[], Field[], To[], Where[], Where2[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(To, To);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Where2, Where2);
format(query, 128, "UPDATE `%s` SET `%s` = '%s' WHERE `%s` = '%s'", Table, Field, To, Where, Where2);
mysql_query(query);
return true;
}
stock mysql_SetFloat(Table[], Field[], Float:To, Where[], Where2[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Where2, Where2);
format(query, 128, "UPDATE `%s` SET `%s` = '%f' WHERE `%s` = '%s'", Table, Field, To, Where, Where2);
mysql_query(query);
return true;
}
stock CreateAccount(playerid, pass[])
{
new query[256],Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
mysql_real_escape_string(Name,Name);
mysql_real_escape_string(pass,pass);
format(query, sizeof(query), "INSERT INTO `accounts` (`Name`, `Passwort`) VALUES ('%s', '%s')", Name, pass);
mysql_query(query);
return true;
}
stock mysql_ReturnPasswort(Name[])
{
new query[130], Get[130];
mysql_real_escape_string(Name, Name);
format(query, 128, "SELECT `passwort` FROM `accounts` WHERE `Name` = '%s'", Name);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(Get);
mysql_free_result();
return Get;
}
stock LoadPlayer(playerid)
{
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))//Wir fragen ab ob der angegebene Spieler auch Online ist, und kein NPC ist (nur zur sicherhheit)
{
GetPlayerName(playerid, SpielerInfo[playerid][pName], MAX_PLAYER_NAME); //Wir Speichern den Namen des Spielers in der Variable [i]SpielerInfo[playerid][pName][/i]
SpielerInfo[playerid][pLevel] = mysql_GetInt("accounts", "Level", "Name", SpielerInfo[playerid][pName]); //Wir holen uns den wert der unter "Level" eingetragen ist und Speichern ihn in unserer Variable.
SpielerInfo[playerid][pGeld] = mysql_GetInt("accounts", "Geld", "Name", SpielerInfo[playerid][pName]); //Wir holen uns den wert der unter "Geld" eingetragen ist und Speichern ihn in unserer Variable.
SpielerInfo[playerid][pKills] = mysql_GetInt("accounts", "Kills", "Name", SpielerInfo[playerid][pName]); //Wir holen uns den wert der unter "Kills" eingetragen ist und Speichern ihn in unserer Variable.
SpielerInfo[playerid][pTode] = mysql_GetInt("accounts", "Tode", "Name", SpielerInfo[playerid][pName]); //Wir holen uns den wert der unter "Tode" eingetragen ist und Speichern ihn in unserer Variable.
}
return 1;
}
stock mysql_GetInt(Table[], Field[], Where[], Is[])
{
new query[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
new sqlint = mysql_fetch_int();
mysql_free_result();
return sqlint;
}
stock mysql_GetString(Table[], Field[], Where[], Is[])
{
new query[128], Get[128];
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
mysql_fetch_row(Get);
mysql_free_result();
return Get;
}
stock Float:mysql_GetFloat(Table[], Field[], Where[], Is[])
{
new query[128], Float:sqlfloat;
mysql_real_escape_string(Table, Table);
mysql_real_escape_string(Field, Field);
mysql_real_escape_string(Where, Where);
mysql_real_escape_string(Is, Is);
format(query, 128, "SELECT `%s` FROM `%s` WHERE `%s` = '%s'", Field, Table, Where, Is);
mysql_query(query);
mysql_store_result();
mysql_fetch_float(sqlfloat);
mysql_free_result();
return sqlfloat;
}
stock mysql_CheckAccount(playerid)
{
new Query[128],Name[MAX_PLAYER_NAME],count;
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
mysql_real_escape_string(Name, Name);
format(Query, sizeof(Query), "SELECT * FROM `accounts` WHERE `Name` = '%s'", Name);
mysql_query(Query);
mysql_store_result();
count = mysql_num_rows();
mysql_free_result();
return count;
}