Hm?
Du sollst einfach nur den Code aus der Zeile hier posten.
Die Zeilen 11986, 11989, 11991.
Hm?
Du sollst einfach nur den Code aus der Zeile hier posten.
Die Zeilen 11986, 11989, 11991.
Sorry ich war durcheinander :D.
Also
11986:mysql_fetch_field("wins",val);
11989:mysql_fetch_field("champ",Titel[TitelName]);
11991:mysql_fetch_field("loses",val);
Kein Problem.
Ändere alle
mysql_fetch_field
zu:
mysql_get_field
Okey gemacht. Nun noch 3 Errors:
D:\SAMP Server\gamemodes\Roleplay.pwn(12350) : error 017: undefined symbol "mysql_log"
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : error 029: invalid expression, assumed zero
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : warning 202: number of arguments does not match definition
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : error 001: expected token: ",", but found ";"
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : warning 204: symbol is assigned a value that is never used: "mysql"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
Edit: Habe einen Fehler behoben. Nun noch 1 Error:
D:\SAMP Server\gamemodes\Roleplay.pwn(12350) : error 017: undefined symbol "mysql_log"
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : warning 213: tag mismatch
D:\SAMP Server\gamemodes\Roleplay.pwn(12351) : warning 204: symbol is assigned a value that is never used: "mysql"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
mysql_log zu:
mysql_debug(1);
bzw. 0, falls du es nicht an haben willst.
Und
new MySQL:mysql;
zu:
new mysql;
Und bei OnGameModeExit:
mysql_close(mysql);
Gemacht. Am besten hilfst du über TV. Hier die Errors:
D:\SAMP Server\gamemodes\Roleplay.pwn(13990) : warning 209: function "ScriptInit_OnGameModeExit" should return a value
D:\SAMP Server\gamemodes\Roleplay.pwn(13991) : error 055: start of function body without function header
D:\SAMP Server\gamemodes\Roleplay.pwn(13994) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Das mache ich nur wenn es nicht anders geht. Bis hier hin sind das nur Code-Fehler die wir auch so lösen können und somit anderen, die ähnliche Probleme haben, bereits eine Lösungshilfe hinterlassen.
Poste bitte die Code-Zeilen 13980 bis 14005.
Okey hier:
gPlayerCheckpointStatus[i] = CHECKPOINT_NONE;
GameTextForPlayer(i, string, 4000, 5);
SetPlayerCameraPos(i,1460.0, -1324.0, 287.2);
SetPlayerCameraLookAt(i,1374.5, -1291.1, 239.0);
}
}
public OnGameModeExit()
{
mysql_close(mysql);
}
{
DestroyVehicle(submarine), DestroyObject(submarine_object);
return 1;
}
forward BeforeGameModeExit(bizid, playerid);
public BeforeGameModeExit(bizid, playerid)
{
OOCOff(COLOR_OOC,"Der Server wird gleich neugestartet, alle Sachen werden jetzt gespeichert!");
new i=0;
public OnGameModeExit()
{
mysql_close(mysql);
}
{
DestroyVehicle(submarine), DestroyObject(submarine_object);
return 1;
}
zu:
public OnGameModeExit()
{
mysql_close(mysql);
DestroyVehicle(submarine);
DestroyObject(submarine_object);
return 1;
}
Server läuft! Danke schonmal dafür <3. Nun fällt mir noch ein Problem auf: Die Accounts werden nicht in der Datenbank gespeichert. Hier sende ich nochmal den Log falls das hilft:
SA-MP Dedicated Server
----------------------
v0.3z, (C)2005-2014 SA-MP Team
[15:41:44]
[15:41:44] Server Plugins
[15:41:44] --------------
[15:41:44] Loading plugin: mysql
[15:41:44]
> MySQL plugin R5 successfully loaded.
[15:41:44] Loaded.
[15:41:44] Loading plugin: streamer
[15:41:44]
*** Streamer Plugin v2.7 by Incognito loaded ***
[15:41:44] Loaded.
[15:41:44] Loading plugin: sscanf
[15:41:44]
[15:41:44] ===============================
[15:41:44] sscanf plugin loaded.
[15:41:44] (c) 2009 Alex "Y_Less" Cole
[15:41:44] ===============================
[15:41:44] Loaded.
[15:41:44] Loading plugin: nativechecker
[15:41:44] Loaded.
[15:41:44] Loaded 4 plugins.
[15:41:44]
[15:41:44] Ban list
[15:41:44] --------
[15:41:44] Loaded: samp.ban
[15:41:44]
[15:41:44]
[15:41:44] Filterscripts
[15:41:44] ---------------
[15:41:44] Loading filterscript 'objects-server.amx'...
[15:41:44] *** Streamer Plugin: Warning: Include file version (0x27201) does not match plugin version (0x27002) (script might need to be recompiled with the latest include file)
[15:41:44] Server Objecte werden geladen
[15:41:44] *** Streamer_SetFloatData: Invalid ID specified
[15:41:44] 1064 Gemappte Objecte Geladen
[15:41:44] Loading filterscript 'dubstepgun.amx'...
[15:41:44]
--------------------------------------
[15:41:44] -----Dubstep Gun System by RenovanZ-----
[15:41:44] Dance with your Song!
[15:41:44] --------------------------------------
[15:41:44] Loading filterscript 'neon.amx'...
[15:41:44]
--------------------------------------
[15:41:44] Neon System By AlexzzPro
[15:41:44] --------------------------------------
[15:41:44] Loading filterscript 'Minievent.amx'...
[15:41:44]
--------------------------------------
[15:41:44] Mini-Events by Jafet Macario
[15:41:44] --------------------------------------
[15:41:44] Loading filterscript 'lotto.amx'...
[15:41:44] Loading filterscript 'BSystem.amx'...
[15:41:44]
[15:41:44]
--------------------------------
[15:41:44] Adil's [NPC]LS Bus System.
[15:41:44] --------------------------------
[15:41:44]
[15:41:44] Loading filterscript 'autowaesche.amx'...
[15:41:44]
-----------------------------------------------
[15:41:44] ---=== Car Wash Filterscript by Angeleno ===---
[15:41:44] -------------- Copyright -- 2011 --------------
[15:41:44] Loading filterscript 'spawner.amx'...
[15:41:44] Loading filterscript 'cameditor.amx'...
[15:41:44]
--------------------------------------
[15:41:44] CamEditor by Drebin
[15:41:44] --------------------------------------
[15:41:44] Loaded 9 filterscripts.
[15:41:44]
[15:41:44]
[15:41:44]
[15:41:44] =======================================
[15:41:44] | |
[15:41:44] | YSI version 3.09.0684 |
[15:41:44] | By Alex "Y_Less" Cole |
[15:41:44] | |
[15:41:44] =======================================
Alles anzeigen
Nur als Hinweis: Das Streamer Plugin solltest du auch aktualisieren und deinen Code mit der neusten Include kompilieren.
http://forum.sa-mp.com/showthread.php?t=102865
Zwecks den Accounts:
Was steht denn im MySQL Log, wenn du einen Spieler speicherst? Setzt ggf. mysql_debug wieder auf 1.
So erstmal zu der Datenbank:
Die Accounts wurden sonst immer Automatisch in die MySQL Datenbank übertragen.
Wenn ich aber nun über PHPmyAdmin die Tabelle "accounts" aufrufe steht dort nichts ausser "Erzeuge View" usw. Ich habe als Test einen Account eingetragen und er wurde weder über Navicat noch über PHPmyAdmin angenommen.
Das Streamer Plugin habe ich nun komplett aktualisiert, trotzdem wird mir dies im Log angezeigt:
[15:53:31] *** Streamer Plugin: Include file version (0x27201) does not match plugin version (0x276001) (script might need to be recompiled with the latest include file)
[15:53:31] Server Objecte werden geladen
[15:53:31] *** Streamer Plugin: Streamer_SetFloatData: Invalid ID specified
[15:53:31] *** Streamer Plugin: Streamer_SetVisibleItems: Expecting 3 parameter(s), but found 2
Edit:
Kann das Problem mit mysql daran liegen,dass ich mysql_log rausgenommen habe ?
Zum Streamer:
Du benötigst die neuste Include sowie das neuste Plugin. Danach musst du mit dem neusten Include den Code kompilieren. Sonst geht die Meldung nicht weg (gleich wie zuvor mit MySQL).
Zu den Accounts:
mysql_debug(1);
Schreibe das bei OnGameModeInit hin.
Was steht dann im MySQL Log, wenn du ein Account anlegst? Poste das.
Also das Plugin ist nun komplett aktualisiert und zeigt auch nurnoch einen Fehler:
[20:43:33] *** Streamer Plugin: Streamer_SetFloatData: Invalid ID specified
Das Mysql_Debug hatte ich schon bei OnGameModeInit stehen, da ich es doch eben austauschen musste gegen Mysql_log. Ich glaube auch seitdem speichert er die Accounts nichtmehr
Edit:
Weisst du vielleicht, wie man das Passwort von Mysql root ändert ? Es könnte auch daran liegen, da ich vor 1 Jahr ein Passwort festgelegt habe, aber nun vergessen habe.
Edit²: Man braucht sich noch nichtmal mehr registrieren, wenn man den Server joint. Da steht direkt Login als wäre dieser Account vorhanden. Habe es jetzt mit mehreren ausprobiert. Außerdem ist es egal welches Passwort man eingibt, man kommt immer rein.
Suche in deinem Code nach
Streamer_SetFloatData
und lösche die Zeile, das brauchst du wahrscheinlich sowieso nicht.
Zu Edit 1:
https://dev.mysql.com/doc/refm…esetting-permissions.html
Zu Edit 2:
Das kann daran liegen, dass du keine Verbindung hast. Poste bitte was im MySQL Log steht.
Wenn mysql_debug nicht geht, nimm mysql_log(LOG_ALL) bei OnGameModeInit.
Ich hab scheisse gebaut mit dem Passwort und installiere gerade Xampp neu.
Hier der MySQL Log:
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_fetch_int called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_query called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_store_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_num_rows called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
[Fri May 15 13:13:05 2015] Error (0): Function: mysql_free_result called when not connected to any database. Access denied for user 'root' localhost (using password: YES).
EDIT:
Habe nun Mysql_debug in Mysql_log umgeschrieben. Nun bekomme ich diesen Error:
D:\SAMP Server\gamemodes\Roleplay.pwn(12349) : error 017: undefined symbol "mysql_log"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Error.
Das ist ja jetzt wieder der gleiche Fehler wie zu Anfangs, bevor du das Plugin gewechselt hast.
Nimm den root Benutzer ohne Passwort:
#define MYSQL_HOST "127.0.0.1"
#define MYSQL_USER "root"
#define MYSQL_DATABASE "Datenbank"
#define MYSQL_PASS ""
Das ist in 99% aller Fälle standardmäßig so eingestellt, ohnehin so, wenn du es neu installierst.
Zwecks dem Error:
Ja also dann doch mysql_debug wie ich schon sagte.
mysql_debug(1);
Bei mir sieht das mit der Datenbank so aus also ich hab bisjetzt nochnichts geändert:
#define MYSQL_HOST "localhost"
#define MYSQL_USER "root"
#define MYSQL_PASS ""
#define MYSQL_DATABASE "samp"
Heißt deine Datenbank auch "samp"?
MySQL (etc) alles korrekt aufgesetzt, also kommst du mit z.B. phpMyAdmin auf die Datenbank?
Hast du es mal mit 127.0.0.1 anstatt localhost versucht?
Was sagt der MySQL Log, wenn du den Server startest (zuvor leeren)?
Hier der mysql log:
[23:53:56] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[23:53:56] >> mysql_store_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::StoreResult() - There is nothing to store (Reason: Connection is dead)
[23:53:56] >> mysql_num_rows( Connection handle: 1 )
[23:53:56] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
[23:53:56] >> mysql_free_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead)
[23:53:56] >> mysql_query( Connection handle: 1 )
[23:53:56] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[23:53:56] >> mysql_store_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::StoreResult() - There is nothing to store (Reason: Connection is dead)
[23:53:56] >> mysql_num_rows( Connection handle: 1 )
[23:53:56] CMySQLHandler::NumRows() - You cannot call this function now. (Reason: Dead Connection)
[23:53:56] >> mysql_free_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead)
[23:53:56] >> mysql_query( Connection handle: 1 )
[23:53:56] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[23:53:56] >> mysql_store_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::StoreResult() - There is nothing to store (Reason: Connection is dead)
[23:53:56] >> mysql_fetch_int( Connection handle: 1 )
[23:53:56] CMySQLHandler::FetchRow() - You cannot call this function now. (Reason: Connection is dead)
[23:53:56] >> mysql_free_result( Connection handle: 1 )
[23:53:56] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead)
[00:01:18] >> mysql_query( Connection handle: 1 )
[00:01:18] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:01:18] >> mysql_free_result( Connection handle: 1 )
[00:01:18] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_query( Connection handle: 1 )
[00:15:47] CMySQLHandler::Query() - You cannot call this function now. (Reason: Connection is dead)
[00:15:47] >> mysql_free_result( Connection handle: 1 )
[00:15:47] CMySQLHandler::FreeResult() - There is nothing to free (Reason: Connection is dead)
Alles anzeigen
Und hier der Login Code:
public OnPlayerRequestClass(playerid, classid)
{
ClearChatbox(playerid,20);
if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
{
new string[80];
format(string,sizeof(string),"Willkommen bei %s\n\nBitte Logge dich ein.",SERVERNAME);
ShowUserDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login",string,"Login","Abbrechen");
}
else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
{
if(disablereg == true)
{
SCM(playerid, COLOR_GREY, "Die Registration ist zurzeit ausgeschaltet!");
KickEx(playerid);
return 1;
}
else ShowUserDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"{33CCFF}Account Erstellen{FFFFFF}","Du benötigst einen Account, um auf diesem Server zu spielen!","Erstellen","Abbrechen");
}
SetupPlayerForClassSelection(playerid);
return 1;
}
EDIT!:
if(dialogid == DIALOG_LOGIN)
{
if(response && strlen(inputtext) > 0)
{
new query[265],val[128],string[40];
format(query, sizeof(query), "SELECT * FROM `accounts` WHERE `name`='%s' AND `passwort`='%s'", SpielerInfo[playerid][Name], inputtext);
mysql_query(query);
mysql_store_result();
if(mysql_num_rows())
{
SetPlayerHealth(playerid,100);
printf("Spieler %s wird geladen", SpielerInfo[playerid][Name]);
mysql_get_field("banned",val); SpielerInfo[playerid][pGebannt] = strval(val);
mysql_get_field("admin",val); SpielerInfo[playerid][pAdmin] = strval(val);
mysql_get_field("donater",val); SpielerInfo[playerid][pDonateRank] = strval(val);
mysql_get_field("upgradepoints",val); SpielerInfo[playerid][gPupgrade] = strval(val);
mysql_get_field("reg",val); SpielerInfo[playerid][pReg] = strval(val);
mysql_get_field("sex",val); SpielerInfo[playerid][pSex] = strval(val);
mysql_get_field("exp",val); SpielerInfo[playerid][pExp] = strval(val);
mysql_get_field("level",val); SpielerInfo[playerid][pAge] = strval(val);
mysql_get_field("hand",val); SpielerInfo[playerid][pCash] = strval(val);
print("1");
mysql_get_field("konto",val); SpielerInfo[playerid][pAccount] = strval(val);
mysql_get_field("crimes",val); SpielerInfo[playerid][pCrimes] = strval(val);
mysql_get_field("arrested",val); SpielerInfo[playerid][pArrested] = strval(val);
mysql_get_field("wanteddeaths",val); SpielerInfo[playerid][pWantedDeaths] = strval(val);
mysql_get_field("phonebook",val); SpielerInfo[playerid][pPhoneBook] = strval(val);
mysql_get_field("lottonr",val); SpielerInfo[playerid][pLottoNr] = strval(val);
mysql_get_field("fishes",val); SpielerInfo[playerid][pFishes] = strval(val);
mysql_get_field("biggestfish",val); SpielerInfo[playerid][pBiggestFish] = strval(val);
mysql_get_field("job",val); SpielerInfo[playerid][sJob] = strval(val);
mysql_get_field("kills",val); SpielerInfo[playerid][pKills] = strval(val);
mysql_get_field("deaths",val); SpielerInfo[playerid][pDeaths] = strval(val);
mysql_get_field("jobgehalt",val); SpielerInfo[playerid][pJobGehalt] = strval(val);
mysql_get_field("headvalue",val); SpielerInfo[playerid][pHeadValue] = strval(val);
mysql_get_field("jailed",val); SpielerInfo[playerid][pJailed] = strval(val);
mysql_get_field("jailtime",val); SpielerInfo[playerid][pJailTime] = strval(val);
mysql_get_field("mats",val); SpielerInfo[playerid][pMats] = strval(val);
mysql_get_field("gras",val); SpielerInfo[playerid][pGras] = strval(val);
print("2");
mysql_get_field("lsd",val); SpielerInfo[playerid][pLSD] = strval(val);
mysql_get_field("kokain",val); SpielerInfo[playerid][pKokain] = strval(val);
mysql_get_field("helmid",val); SpielerInfo[playerid][pHelmID] = strval(val);
mysql_get_field("kmedizin",val); SpielerInfo[playerid][pKMedizin] = strval(val);
mysql_get_field("gmedizin",val); SpielerInfo[playerid][pGMedizin] = strval(val);
mysql_get_field("member",val); SpielerInfo[playerid][sMember] = strval(val);
if(SpielerInfo[playerid][sMember] == 19)
{
SpielerInfo[playerid][sMember] = 0;
SpielerInfo[playerid][pRank] = 0;
SCM(playerid,0xFF0000FF,"Terroristen gibt's nicht mehr!");
new queryxd[128];
format(queryxd, 128, "UPDATE `accounts` SET `member`='0',`rank`='0' WHERE `name`='%s'", SpielerInfo[playerid][Name]);
mysql_query(queryxd);
}
mysql_get_field("rank",val); SpielerInfo[playerid][pRank] = strval(val);
mysql_get_field("charakter",val); SpielerInfo[playerid][pChar] = strval(val);
mysql_get_field("contracttime",val); SpielerInfo[playerid][pContractTime] = strval(val);
mysql_get_field("health",val); SpielerInfo[playerid][pHealth] = floatstr(val);
mysql_get_field("interior",val); SpielerInfo[playerid][pInt] = strval(val);
mysql_get_field("local",val); SpielerInfo[playerid][pLocal] = strval(val);
mysql_get_field("team",val); SpielerInfo[playerid][pTeam] = strval(val);
mysql_get_field("pnumber",val); SpielerInfo[playerid][pPnumber] = strval(val);
mysql_get_field("housekey",val); SpielerInfo[playerid][pPhousekey] = strval(val);
mysql_get_field("bizzkey",val); SpielerInfo[playerid][pPbiskey] = strval(val);
mysql_get_field("carlic",val); SpielerInfo[playerid][pCarLic] = strval(val);
mysql_get_field("flylic",val); SpielerInfo[playerid][pFlyLic] = strval(val);
mysql_get_field("motolic",val); SpielerInfo[playerid][pMotoLic] = strval(val);
mysql_get_field("lkwlic",val); SpielerInfo[playerid][pLKWLic] = strval(val);
print("3");
mysql_get_field("ALG",val); SpielerInfo[playerid][pARG] = strval(val);
mysql_get_field("carinsurance",val); SpielerInfo[playerid][pCarInsurance] = strval(val);
mysql_get_field("lifeinsurance",val); SpielerInfo[playerid][pLifeInsurance] = strval(val);
mysql_get_field("boxmats",val); SpielerInfo[playerid][pBoxMats] = strval(val);
mysql_get_field("boxgras",val); SpielerInfo[playerid][pBoxGras] = strval(val);
mysql_get_field("boxlsd",val); SpielerInfo[playerid][pBoxLSD] = strval(val);
mysql_get_field("boxkokain",val); SpielerInfo[playerid][pBoxKokain] = strval(val);
mysql_get_field("boatlic",val); SpielerInfo[playerid][pBoatLic] = strval(val);
mysql_get_field("fishlic",val); SpielerInfo[playerid][pFishLic] = strval(val);
mysql_get_field("gunlic",val); SpielerInfo[playerid][pGunLic] = strval(val);
mysql_get_field("gun1",val); SpielerInfo[playerid][pGun1] = strval(val);
mysql_get_field("gun2",val); SpielerInfo[playerid][pGun2] = strval(val);
mysql_get_field("gun3",val); SpielerInfo[playerid][pGun3] = strval(val);
mysql_get_field("gun4",val); SpielerInfo[playerid][pGun4] = strval(val);
mysql_get_field("gun5",val); SpielerInfo[playerid][pGun5] = strval(val);
mysql_get_field("gun6",val); SpielerInfo[playerid][pGun6] = strval(val);
mysql_get_field("ammo1",val); SpielerInfo[playerid][pAmmo1] = strval(val);
mysql_get_field("ammo2",val); SpielerInfo[playerid][pAmmo2] = strval(val);
mysql_get_field("ammo3",val); SpielerInfo[playerid][pAmmo3] = strval(val);
mysql_get_field("ammo4",val); SpielerInfo[playerid][pAmmo4] = strval(val);
print("4");
mysql_get_field("ammo5",val); SpielerInfo[playerid][pAmmo5] = strval(val);
mysql_get_field("ammo6",val); SpielerInfo[playerid][pAmmo6] = strval(val);
mysql_get_field("payday",val); SpielerInfo[playerid][pPayDay] = strval(val);
mysql_get_field("paydayhad",val); SpielerInfo[playerid][pPayDayHad] = strval(val);
mysql_get_field("cdplayer",val); SpielerInfo[playerid][pCDPlayer] = strval(val);
mysql_get_field("wins",val); SpielerInfo[playerid][pWins] = strval(val);
mysql_get_field("loses",val); SpielerInfo[playerid][pLoses] = strval(val);
mysql_get_field("alcoholperk",val); SpielerInfo[playerid][pAlcoholPerk] = strval(val);
mysql_get_field("drugperk",val); SpielerInfo[playerid][pDrugPerk] = strval(val);
mysql_get_field("miserperk",val); SpielerInfo[playerid][pMiserPerk] = strval(val);
mysql_get_field("painperk",val); SpielerInfo[playerid][pPainPerk] = strval(val);
mysql_get_field("traderperk",val); SpielerInfo[playerid][pTraderPerk] = strval(val);
mysql_get_field("detskill",val); SpielerInfo[playerid][pDetSkill] = strval(val);
mysql_get_field("sexskill",val); SpielerInfo[playerid][pSexSkill] = strval(val);
mysql_get_field("boxskill",val); SpielerInfo[playerid][pBoxSkill] = strval(val);
mysql_get_field("lawskill",val); SpielerInfo[playerid][pLawSkill] = strval(val);
mysql_get_field("mechskill",val); SpielerInfo[playerid][pMechSkill] = strval(val);
mysql_get_field("jackskill",val); SpielerInfo[playerid][pJackSkill] = strval(val);
mysql_get_field("carskill",val); SpielerInfo[playerid][pCarSkill] = strval(val);
mysql_get_field("newsskill",val); SpielerInfo[playerid][pNewsSkill] = strval(val);
mysql_get_field("cockskill",val); SpielerInfo[playerid][pCookSkill] = strval(val);
mysql_get_field("fishskill",val); SpielerInfo[playerid][pFishSkill] = strval(val);
mysql_get_field("farmerskill",val); SpielerInfo[playerid][pFarmerSkill] = strval(val);
mysql_get_field("tut",val); SpielerInfo[playerid][pTut] = strval(val);
mysql_get_field("warns",val); SpielerInfo[playerid][pWarns] = strval(val);
print("5");
mysql_get_field("fuel",val); SpielerInfo[playerid][pFuel] = strval(val);
mysql_get_field("married",val); SpielerInfo[playerid][pMarried] = strval(val);
mysql_get_field("marriedto",val); SpielerInfo[playerid][pMarriedTo] = val;
mysql_get_field("kampfstil",val); SpielerInfo[playerid][pKampfstil] = strval(val);
mysql_get_field("spawnchange",val); SpielerInfo[playerid][pSpawnChange] = strval(val);
mysql_get_field("wanteds",val); SetPlayerWantedLevel(playerid, strval(val));
mysql_get_field("sflic",val); SpielerInfo[playerid][pSFLic] = strval(val);
mysql_get_field("lvlic",val); SpielerInfo[playerid][pLVLic] = strval(val);
mysql_get_field("uhrid",val); SpielerInfo[playerid][pUhrID] = strval(val);
mysql_get_field("ownperso",val); SpielerInfo[playerid][pOwnPerso] = strval(val);
mysql_get_field("pinb",val); SpielerInfo[playerid][pPinB] = strval(val);
mysql_get_field("handyid",val); SpielerInfo[playerid][pHandyID] = strval(val);
mysql_get_field("handyton",val); SpielerInfo[playerid][pHandyTon] = strval(val);
mysql_get_field("handyakku",val); SpielerInfo[playerid][pHandyAkku] = strval(val);
mysql_get_field("zigid",val); SpielerInfo[playerid][pZigID] = strval(val);
mysql_get_field("zig",val); SpielerInfo[playerid][pZig] = strval(val);
mysql_get_field("zigsucht",val); SpielerInfo[playerid][pZigSucht] = strval(val);
mysql_get_field("handygeld",val); SpielerInfo[playerid][pHandyGeld] = strval(val);
mysql_get_field("handyver",val); SpielerInfo[playerid][pHandyVer] = strval(val);
mysql_get_field("gwd",val); SpielerInfo[playerid][pGWD] = floatstr(val);
mysql_get_field("playminutes",val); SpielerInfo[playerid][pPlayMinutes] = strval(val);
mysql_get_field("gesamtminutes",val); SpielerInfo[playerid][pGesamtMinutes] = strval(val);
mysql_get_field("pfandflaschen",val); SpielerInfo[playerid][sPfandflaschen] = strval(val);
mysql_get_field("coins",val); SpielerInfo[playerid][pCoins] = strval(val);
mysql_get_field("tban",val); SpielerInfo[playerid][tban] = strval(val);
print("6");
mysql_free_result();
print("7");
if(SpielerInfo[playerid][pGebannt] == 1) {
SCM(playerid,COLOR_LIGHTRED,"Dein Account wurde Gebannt!");
Ban(playerid);
}
if(gettime() < SpielerInfo[playerid][tban]) {
SCM(playerid,COLOR_LIGHTRED,"Dein Account wurde Zeitgebannt!");
KickEx(playerid);
} else {
SpielerInfo[playerid][tban] = 0;
}
mysql_get_field("tottime",val); SpielerInfo[playerid][pTottime] = strval(val);
SetPlayerScore(playerid, SpielerInfo[playerid][pAge]);
if(SpielerInfo[playerid][pKampfstil] == 1)