Nice
Wie setze ich per Script auf Mysql ?
Beiträge von xNait aka. NIKEiD2.0
-
-
Hey
So ein Design sieht echt nett aus
Aber so ein ähnliches bietet Creative-Styles kostelos.
Also dies ist aber besser. Kann man nicht am Preis was machen ? -
Hey Leute,
ich habe mein Script auf Mysql umgeschrieben.
Nun haben schon alle angefangen wieder zu zocken.
Mein Problem nun, ich will die Passwörter auf MD5 verschlüsseln.
Meine Fragen dazu:- Geht das noch ? Also werden die schon registrierten übernommen.
- Und wie geht das mit Mysql
Liebe Grüße -
Hmmm ?
Ist es nicht so, dass wenn man die PSC fürs gamen braucht.
Volle 10€ sind. -
______
Unverbindlicher Hinweis: Die Sicherheit einer Transaktion kann am besten durch die Einschaltung eines Mittelsmannes gewährleistet werden. Weitere Informationen dazu gibt es hier.Hey Leute,
ich suche jemanden der mit mir 10€ PayPal gegen meine 10€ PSC tauscht.
Natürlich nur mit Mittelsmann.
Warum eigentlich ?
Weil ja beides den selben Wert hat, aber durch den change den Wert verliert.
Und momentan changed anscheinend keiner.Mit freundlichem Gruß ICH
-
Mach ich, aber vorher noch:
Ist schlimm wenn ich das alte Ende von OnPlayerLogin in den stock LoadPlayer mit übernehme ?
stock LoadPlayer(playerid)
{
new tmp2[256];
new string2[64];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
if(IsPlayerConnected(playerid) && !IsPlayerNPC(playerid))//Wir fragen ab ob der angegebene Spieler auch Online ist, und kein NPC ist (nur zur sicherhheit)
{
GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME); //Wir Speichern den Namen des Spielers in der Variable [i]PlayerInfo[playerid][pName][/i]
PlayerInfo[playerid][pLevel] = mysql_GetInt("accounts", "pLevel", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Level" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][pAdmin] = mysql_GetInt("accounts", "pAdmin", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Geld" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][pDonateRank] = mysql_GetInt("accounts", "pDonateRank", "Name", PlayerInfo[playerid][pName]);
//Kleiner Sprung.....
PlayerInfo[playerid][pAdjustable] = 0;
ResetPlayerMoney(playerid);
ConsumingMoney[playerid] = 1;
GivePlayerMoney(playerid,PlayerInfo[playerid][pCash]);
CurrentMoney[playerid] = PlayerInfo[playerid][pCash];
if(PlayerInfo[playerid][pReg] == 0)
{
PlayerInfo[playerid][pLevel] = 1;
PlayerInfo[playerid][pSHealth] = 0.0;
....//mysql_debug(1); eingefügt aber es tut sich nichts:
Loaded log file: "server_log.txt".
----------SA-MP Dedicated Server
----------------------
v0.3d, (C)2005-2011 SA-MP Team[14:04:12]
[14:04:12] Server Plugins
[14:04:12] --------------
[14:04:12] Loading plugin: streamer.so
[14:04:12]*** Streamer Plugin v2.6 by Incognito loaded ***
[14:04:12] Loaded.
[14:04:12] Loading plugin: mysql.so
[14:04:12]> MySQL plugin R5 successfully loaded.
[14:04:12] Loaded.
[14:04:12] Loaded 2 plugins.[14:04:12]
[14:04:12] Ban list
[14:04:12] --------
[14:04:12] Loaded: samp.ban
[14:04:12]
[14:04:12]
[14:04:12] Filterscripts
[14:04:12] ---------------
[14:04:12] Loading filterscript 'JunkBuster.amx'...
[14:04:12]
[14:04:12] [junkbuster] Current JunkBuster configuration:
[14:04:12] [junkbuster] - WeaponHack = 0
[14:04:12] [junkbuster] - MoneyHack = 1
[14:04:12] [junkbuster] - Jetpack = 0
[14:04:12] [junkbuster] - HealthHack = 0
[14:04:12] [junkbuster] - ArmourHack = 0
[14:04:12] [junkbuster] - DriveBy = 0
[14:04:12] [junkbuster] - Spam = 1
[14:04:12] [junkbuster] - CommandSpam = 0
[14:04:12] [junkbuster] - BadWords = 1
[14:04:12] [junkbuster] - CarJackHack = 0
[14:04:12] [junkbuster] - TeleportHack = 1
[14:04:12] [junkbuster] - MaxPing = 0
[14:04:12] [junkbuster] - SpectateHack = 1
[14:04:12] [junkbuster] - Blacklist = 1
[14:04:12] [junkbuster] - IpBans = 1
[14:04:12] [junkbuster] - TempBans = 1
[14:04:12] [junkbuster] - SpawnKill = 1
[14:04:12] [junkbuster] - CapsLock = 1
[14:04:12] [junkbuster] - 3DSpeed = 0
[14:04:12] [junkbuster] - MaxSpeed = 0
[14:04:12] [junkbuster] - AdminImmunity = 1
[14:04:12] [junkbuster] - Advertisement = 0
[14:04:12] [junkbuster] - FreezeUpdate = 0
[14:04:12] [junkbuster] - SpawnTime = 5
[14:04:12] [junkbuster] - CheckpointTeleport = 1
[14:04:12] [junkbuster] - Airbrake = 150
[14:04:12] [junkbuster] - TankMode = 1
[14:04:12] [junkbuster] - WarnPlayers = 0
[14:04:12] [junkbuster] - SingleplayerCheats = 1
[14:04:12] [junkbuster] - MinFPS = 0
[14:04:12] [junkbuster] - DisableBadWeapons = 1
[14:04:12] [junkbuster] - CBug = 16
[14:04:12] [junkbuster] - AntiBugKill = 1
[14:04:12] [junkbuster] - NoReload = 0
[14:04:12] [junkbuster] - NoReloadForSawnOff = 4
[14:04:12] [junkbuster] - ActiveGMC = 2
[14:04:12] [junkbuster] - GMCBan = 0
[14:04:12] [junkbuster] - ServerSideHealth = 1
[14:04:12] [junkbuster] - CheckVMPos = 0
[14:04:12] [junkbuster] - QuickTurn = 0
[14:04:12] [junkbuster] - VehicleTeleport = 1
[14:04:12] [junkbuster] - Wallride = 170
[14:04:12] [junkbuster] - DisplayTextDraw = 1
[14:04:12] [junkbuster] - AFK = 20
[14:04:12] [junkbuster] - PickupTeleport = 1
[14:04:12] [junkbuster] - FlyHack = 40
[14:04:12] [junkbuster] - JunkBusterChrome = 1
[14:04:12] [junkbuster] - CheckWalkAnims = 1
[14:04:12] [junkbuster] - ReportMoneyHack = 1
[14:04:12] [junkbuster] - SpeedhackAdvanced = 20
[14:04:12] [junkbuster] - Joypad = 0
[14:04:12] [junkbuster] - ArmedVehicles = 0
[14:04:12] [junkbuster] - VehicleRepair = 0
[14:04:12] [junkbuster] - TuningHack = 1
[14:04:12] [junkbuster] - PayForGuns = 3
[14:04:12] [junkbuster] - SpawnVehicles = 2
[14:04:12] [junkbuster] - MaxTotalWarnings = 15
[14:04:12] [junkbuster] - TooManyWarningsAction = 1
[14:04:12]
[14:04:12] [junkbuster] 0 IP-bans have been loaded.
[14:04:12] [junkbuster] 0 temporary bans have been loaded.
[14:04:12] [junkbuster] 0 whitelist entries have been loaded.
[14:04:12] [junkbuster] 5 blacklist entries have been loaded.
[14:04:12] [junkbuster] 41 bad words have been loaded.
[14:04:12] [junkbuster] 4 forbidden weapons have been loaded.
[14:04:12] [junkbuster] JunkBuster has been configurated.
[14:04:12] [junkbuster] JunkBuster (v10.0) has successfully been loaded.
[14:04:12] Loaded 1 filterscripts.[14:04:12] <-| [MYSQL] Verbindung zur Datenbank wurde erfolgreich hergestellt!
[14:04:12] BizzInfo:0 Owner:Staat Message:~w~Waffenladen Entfee:5000 Till:0 Products:100/500 Interior:1.[14:04:12] BizzInfo:1 Owner:The State Message:~w~Gun Shop 2 Entfee:0 Till:0 Products:100/500 Interior:4.
[14:04:12] BizzInfo:2 Owner:The State Message:~w~Restaurant Entfee:0 Till:0 Products:100/500 Interior:1.
[14:04:12] BizzInfo:3 Owner:The State Message:~w~Police Armoury Entfee:0 Till:0 Products:500/500 Interior:10.
[14:04:12] BizzInfo:4 Owner:The State Message:~w~City Bank Entfee:0 Till:0 Products:99619/100000 Interior:0.
[14:04:12] SBizzInfo:0 Owner:crazy Message:LS-Medic Ammu-Nation Entfee:0 Till:15000 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:1 Owner:The State Message:~w~Wang Cars Entfee:0 Till:0 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:2 Owner:The State Message:~w~Phone Company Entfee:0 Till:1495 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:3 Owner:LaCookie Message:~w~Gas Company Entfee:20 Till:56845 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:4 Owner:The State Message:~w~Electricity Company Entfee:0 Till:274092 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:5 Owner:Staat Message:~w~Hotring Racerzz Entfee:5000 Till:150000 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:6 Owner:The State Message:~w~House Upgrade Entfee:0 Till:0 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:7 Owner:The State Message:~w~CNN Studio Entfee:0 Till:244300 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:8 Owner:The State Message:~w~Tow Car Service Entfee:0 Till:0 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:9 Owner:The State Message:~w~General Store Entfee:0 Till:0 Products:100/100 Interior:0.
[14:04:12] SBizzInfo:10 Owner:TieGer Message:PunchLike Paintball-Arena Entfee:3500 Till:7000 Products:68/100 Interior:0.
[14:04:12] SBizzInfo:11 Owner:The State Message:~w~Kart Track Entfee:0 Till:0 Products:100/100 Interior:0.
[14:04:12] Family:0 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:1 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:2 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:3 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:4 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:5 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:6 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:7 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:8 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] Family:9 Taken: 0 Name:None MOTD:None Leader:None Members:0 SpawnX:0.000000 SpawnY:0.000000 SpawnZ:0.000000 Int:0
[14:04:12] CK:0 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:1 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:2 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:3 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:4 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:5 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:6 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:7 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:8 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] CK:9 Taken: 0 Sendername:No-one Giveplayer: No-one
[14:04:12] Paper:0 Used: 0 Maker:No-one. Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:1 Used: 0 Maker:0
Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:2 Used: 0 Maker:No-one. Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:3 Used: 0 Maker:0
Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:4 Used: 0 Maker:No-one. Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:5 Used: 0 Maker:0
Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:6 Used: 0 Maker:No-one. Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:7 Used: 0 Maker:0
Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:8 Used: 0 Maker:No-one. Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] Paper:9 Used: 0 Maker:0
Title: No Title. Text1: I have no text inserted here yet. Text2: I have no text inserted here yet. Text3: I have no text inserted here yet. Text4: I have no text inserted here yet. Text5: I have no text inserted here yet. Text6: I have no text inserted here yet. Text7: I have no text inserted here ye
[14:04:12] AllowAdminTeleport() : function is deprecated. Please see OnPlayerClickMap()
[14:04:12] Pickups Max = 100, Current Pickups = 46
[14:04:12]
[14:04:12]
[14:04:12] German Reallife
[14:04:12] _____________________
[14:04:12]
[14:04:12]
[14:04:12] Number of vehicle models: 71/e: Server_Log
-
Hey Leute,
ich habe mein Script so umgeschrieben: [ SCRIPTING ] MySQL (Installation, Zugriff, Einstellungen, Login & Register Beispiel)
Jedoch werden die PlayerInfo nichts gesetzt , nicht gespeichert und nicht geladen ?
Wieso ?//LoadPlayer
GetPlayerName(playerid, PlayerInfo[playerid][pName], MAX_PLAYER_NAME); //Wir Speichern den Namen des Spielers in der Variable [i]PlayerInfo[playerid][pName][/i]
PlayerInfo[playerid][pLevel] = mysql_GetInt("accounts", "pLevel", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Level" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][pAdmin] = mysql_GetInt("accounts", "pAdmin", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Geld" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][pDonateRank] = mysql_GetInt("accounts", "pDonateRank", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Kills" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][gPupgrade] = mysql_GetInt("accounts", "gPupgrade", "Name", PlayerInfo[playerid][pName]); //Wir holen uns den wert der unter "Tode" eingetragen ist und Speichern ihn in unserer Variable.
PlayerInfo[playerid][pConnectTime] = mysql_GetInt("accounts", "pConnectTime", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][pReg] = mysql_GetInt("accounts", "pReg", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][pSex] = mysql_GetInt("accounts", "pSex", "Name", PlayerInfo[playerid][pName]);
PlayerInfo[playerid][pAge] = mysql_GetInt("accounts", "pAge", "Name", PlayerInfo[playerid][pName]);
.....//Save Player
PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
mysql_SetInt("accounts", "pLevel", PlayerInfo[playerid][pLevel], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pAdmin", PlayerInfo[playerid][pAdmin], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pDonateRank", PlayerInfo[playerid][pDonateRank], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "gPupgrade", PlayerInfo[playerid][gPupgrade], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pConnectTime", PlayerInfo[playerid][pConnectTime], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pReg", PlayerInfo[playerid][pReg], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pSex", PlayerInfo[playerid][pSex], "Name", PlayerInfo[playerid][pName]);
mysql_SetInt("accounts", "pAge", PlayerInfo[playerid][pAge], "Name", PlayerInfo[playerid][pName]);
// Der Server geht an und die Mysql Verbindung besteht....
// Der Rest bleibt ja gleich vom Tutorial.
Screen von der Datenbank (Also so wie ich die Tabelle gemacht habe. Richgitg oder Falsch ?) -
-
Hab es schon hinbekommen danke,
Kann geclosed werden:D -
Hey Brotfischer,
anscheinend habe ich die richtige mysql.so gefunden.
Mein Problem ist nun das der Server wieder offline geht,
weil die Daten nicht richtig sind.
Nun was muss wo hin ?
#define SQL_HOST ""
#define SQL_USER ""
#define SQL_PASS ""
#define SQL_DATA ""
//edit: Das steht dann da:[03:32:11] <-| [MYSQL] Es konnte keine Verbindung zur Datenbank hergestellt werden!
[03:32:11] <-| [MYSQL] Es wird erneut versucht eine Verbindung zur Datenbank herzustellen!
[03:32:11] <-| [MYSQL] Es konnte keine Verbindung zur Datenbank hergestellt werden!
[03:32:11] <-| [MYSQL] Der Server wird nun beendet!/edit: Hab es über eine andere Datenbank laufen lassen und es klappt.
-
//edit: Problem 1 hat sich geklärt aber
Problem 2 nicht ->[SERVER][ LINUX ] Mysql Daten falsch ? -
Hey Leute,
ich habe in PhpMyAdmin ca. 100 Spalten nacheinander hinzugefügt,
da ich mein Scipt umgeschrieben habe. Plötzlich war alles weg und die
Tabelle hat sich neu geöffnet? Kennt das jemand bzw. Why failt das.Lg
-
Jo hab es grad gemerkt.
Kennt jemand ein gutes Tutorial,
wo erklärt wird wie ich die Datenbank in PMA einstelle ?
Habe mein Script schon umgeschriebn ...
Lg -
Hey Leute,
also wie schreibe ich es als Mysql ,
wenn es voher so aussieht ?
//Vorher
if( strcmp( key , "pSHealth" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pSHealth] = floatstr( val ); }
//Nachher
mysql_SetInt("accounts", "pSHealth", PlayerInfo[playerid][pSHealth], "Name", PlayerInfo[playerid][pName]);//Also wenn es ein float ist....
-
Ne ob man das irgendwie übertragen kann.
oder gar nicht. -
Hey Leute,
wenn ich auf Mysql umstelle ?
Wie kann ich dafür sorgen das die Tabellen alle
Daten mitspeichern ?
Geht das? oder muss ich das Mauell machen ?Mit freundlichem Gruß ICH
-
Natürlich ist ein Selfmade mehr arbeit !
Aber wenn man das Godfather gut und selbst durcheditiert,
wird es auch was. Den User spricht es ja an. Das ist wohl das
wichtigste. -
[b]Another Reallife , SA-RL ..... ??
Einer der bekannstesten Server --> GF O.o[
Also wenn GF , dann The Godfather und übersetzten + bearbeiten./b] -
Bei so viel Geld vertrau keinem "Neuling".
http://forum.sa-mp.de/marktpla…BCberweisung-2#post955406
Der hat gute Bewertungen, habe 50€ bei ihm changen lassen ! Alles Super, schau seine Bewertungen an.
/edit: Oh fail, der macht nur PayPal to PSC -