Beiträge von Whice
-
-
Hast du denn mal geguckt ob du was unter dem Port laufen hast, damals war skype oft nen Problem oder vielleicht ein anderer mysql server?
-
Langsam reicht es denn auch mal, die Fragestellung war 2017 mal, welche Funktionen ein UCP haben soll, da seit 4 Jahren keiner mehr auf das Thema eingegangen, ist das Thema beendet.
-
Die PietSmiet's haben nun auch ihr eigenens Badge: PIETSMIET
-
Zweite Impfung erledigt ✅
Bei mir stehts erst in ner Woche an, stört dich das leuchten im Dunkeln eigentlich sehr?
-
Na da muss man dann wohl mitmachen und zuschlagen, bin auch sehr gespannt was am Ende rauskommt. Jeder Cent hilft

-
-
-
Bin mit meinem Auna 900B noch immer recht zufrieden. Ist ein USB Mikro, also kannst du direkt anschließen und loslegen ohne Mischpult etc.
Kostet mittlerweile auch nur noch ca. 70€ mit einem Arm & Spinne bist, wärst du bei 100-150 je nach Arm.
Beim Arm kann ich dir aber nen besseren als den für 20€ empfehlen, da der das einzige ist, was mich an meinem Mikro Setup stört.
Der ist für mich irgendwie zu instabil.
-
Moin, habe leider das Problem das ich meine Datenbank im Script erstellen möchte und somit einen recht langen String brauche.
Um dieses String hier zu erstellen wird sehr viel vom Stack benötigt, hier nochmal die Infos dazu:
C
Alles anzeigenPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase Header size: 2836 bytes Code size: 71848 bytes Data size: 59308 bytes Stack/heap size: 16384 bytes; estimated max. usage=5051 cells (20204 bytes) Total requirements: 150376 bytes SERVER LOG: [debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [debug] Stack pointer (STK) is 0xD928, heap pointer (HEA) is 0xE7AC [debug] AMX backtrace: [debug] #0 0000977c in ?? () in altis-life.amx [debug] #1 00006a9c in public SSCANF_OnGameModeInit () in altis-life.amx [debug] #2 00000e98 in public zcmd_OnGameModeInit () in altis-life.amx [debug] #3 native CallLocalFunction () in samp-server.exe [debug] #4 0000977c in ?? () in altis-life.amx [debug] #5 00006a9c in public SSCANF_OnGameModeInit () in altis-life.amx [debug] #6 00000e98 in public BCRYPT_OnGameModeInit () in altis-life.amx [debug] #7 native CallLocalFunction () in samp-server.exe [debug] #8 0000977c in ?? () in altis-life.amx [debug] #9 00006a9c in public SSCANF_OnGameModeInit () in altis-life.amx [debug] #10 00000e98 in public OnGameModeInit () in altis-life.amxJemand eine Ahnung, wie man sowas Stack/heap effizienter lösen könnte, ohne den Code sehr zu verunstalten?
Code
Alles anzeigen/* * * Diese Funktion erstellt die 'users' Tablle in der Datebank, falls sie noch nicht existiert * Dieses Callback benutzt den Return-Wert nicht. * */ stock CreateUserTable() { new query[2500], query2[2500]; format(query2, sizeof(query2), "\ `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'unique user id',\ `name` VARCHAR(20) NOT NULL COMMENT 'user name (unique)' COLLATE 'utf8mb4_general_ci',\ `password` VARCHAR(61) NOT NULL COMMENT 'password (bcrypt encrypted)' COLLATE 'utf8mb4_general_ci',\ `salt` VARCHAR(11) NOT NULL COMMENT 'unique salt to protect password' COLLATE 'utf8mb4_general_ci',\ `cash` INT(11) NOT NULL DEFAULT '0' COMMENT 'money (cash)',"); format(query2, sizeof(query2), "\ %s`bank` INT(11) NOT NULL DEFAULT '0' COMMENT 'money (on bank-account)',\ `skin` INT(11) NOT NULL DEFAULT '88' COMMENT 'skin model',\ `weapon0` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 0',\ `ammo0` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 0',\ `weapon1` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 1',\ `ammo1` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 1',\ PRIMARY KEY (`id`) USING BTREE", query2); format(query2, sizeof(query2), "\ %s`weapon2` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 2',\ `ammo2` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 2',\ `weapon3` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 3',\ `ammo3` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 3',\ `weapon4` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 4',\ `ammo4` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 4',\ PRIMARY KEY (`id`) USING BTREE", query2); format(query2, sizeof(query2), "\ %s`weapon5` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 5',\ `ammo5` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 5',\ `weapon6` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 6',\ `ammo6` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 6',\ PRIMARY KEY (`id`) USING BTREE", query2); format(query2, sizeof(query2), "\ %s`weapon7` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 7',\ `ammo7` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 7',\ `weapon8` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 8',\ `ammo8` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 8',\ PRIMARY KEY (`id`) USING BTREE", query2); format(query2, sizeof(query2), "\ %s`weapon9` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 9',\ `ammo9` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 9',\ `weapon10` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 10',\ `ammo10` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 10',\ PRIMARY KEY (`id`) USING BTREE", query2); format(query2, sizeof(query2), "\ %s`weapon11` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 11',\ `ammo11` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 11',\ `weapon12` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 12',\ `ammo12` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 12',\ PRIMARY KEY (`id`) USING BTREE", query2); printf("query2: %d", strlen(query2)); // 2311 mysql_format(dbhandle, query, sizeof(query), "CREATE TABLE IF NOT EXISTS `users` (%s)\ COMMENT='all user informations'\ COLLATE='utf8mb4_general_ci'\ ENGINE=InnoDB;", query2); printf("query: %d", strlen(query)); // 2421 mysql_tquery(dbhandle, query); return true; }PS: Ja, ich kenne #pragma dynamic, dies würde wohl auch funktionieren, jedoch bin ich hier auf der Suche nach anderen Codeansätzen zur Umsetzung.
// EDIT
Grade gemerkt das ich auch noch nen kleinen Copy & Paste Fehler drin hatte, konnte so nun und dank der Hilfe von Kaliber den Code start reduzieren und auch den Stack somit nicht mehr allzudoll zu belasten
Code
Alles anzeigen/* * * Diese Funktion erstellt die 'users' Tablle in der Datebank, falls sie noch nicht existiert * Dieses Callback benutzt den Return-Wert nicht. * */ stock CreateUserTable() { new query[2500]; format(query, sizeof(query), "\ `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT 'unique user id',\ `name` VARCHAR(20) NOT NULL COMMENT 'user name (unique)' COLLATE 'utf8mb4_general_ci',\ `password` VARCHAR(61) NOT NULL COMMENT 'password (bcrypt encrypted)' COLLATE 'utf8mb4_general_ci',\ `salt` VARCHAR(11) NOT NULL COMMENT 'unique salt to protect password' COLLATE 'utf8mb4_general_ci',\ `cash` INT(11) NOT NULL DEFAULT '0' COMMENT 'money (cash)',"); format(query, sizeof(query), "\ %s`bank` INT(11) NOT NULL DEFAULT '0' COMMENT 'money (on bank-account)',\ `skin` INT(11) NOT NULL DEFAULT '88' COMMENT 'skin model',\ `weapon0` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 0',\ `ammo0` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 0',\ `weapon1` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 1',\ `ammo1` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 1',", query); format(query, sizeof(query), "\ %s`weapon2` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 2',\ `ammo2` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 2',\ `weapon3` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 3',\ `ammo3` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 3',\ `weapon4` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 4',\ `ammo4` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 4',", query); format(query, sizeof(query), "\ %s`weapon5` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 5',\ `ammo5` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 5',\ `weapon6` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 6',\ `ammo6` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 6',\ `weapon7` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 7',\ `ammo7` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 7',", query); format(query, sizeof(query), "\ %s`weapon8` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 8',\ `ammo8` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 8',\ `weapon9` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 9',\ `ammo9` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 9',\ `weapon10` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 10',\ `ammo10` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 10',", query); format(query, sizeof(query), "\ %s`weapon11` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 11',\ `ammo11` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 11',\ `weapon12` INT(11) NOT NULL DEFAULT '0' COMMENT 'weapon slot 12',\ `ammo12` INT(11) NOT NULL DEFAULT '0' COMMENT 'ammo slot 12',\ PRIMARY KEY (`id`) USING BTREE", query); mysql_format(dbhandle, query, sizeof(query), "CREATE TABLE IF NOT EXISTS `users` (%s)\ COMMENT='all user informations'\ COLLATE='utf8mb4_general_ci'\ ENGINE=InnoDB;", query); //printf("query: %d", strlen(query)); // 2271 mysql_tquery(dbhandle, query); return true; } -
Du hast in Zeile 5 einfach nur die playerid als ersten Parameter vergessen.
Falls du jedoch etwas anderes Abfragen willst, hier nochmal ne Kurzfassung:
Bestimme Area abfragen:
Es gibt IsPlayerInDynamicArea mit zwei parametern playerid & areaid, damit kannst du abfragen ob der Spieler in einer bestimmten Area ist.
Wenn du allerdings abfragen willst, ob der Spieler in irgendeiner Area ist, kannst du IsPlayerInAnyDynamicArea verwenden, dort brauchst du nur die playerid.
Hier nochmal zum Nachschlagen:
-
-
-
-
Es ist 7:20 Uhr und ich trage auf der Arbeit schon eine kurze Hose und trinke Kaffee auf der Terrasse
Und damit GuMo in die Runde, schönes WochenendeEs ist 7:46 Uhr und ich trage auf der Arbeit eine lange Jeans, trinke stilles Wasser und hab die Klima schon auf 21 Grad
Und damit auch von mir GuMo und Gut Kick in die Runde und angenehmes Wochenende allen
-
-
San Andreas Multiplayer (SAMP) Server im Stil von Altis-Life
Was eine innovative und interessante Idee

Mal gucken ob der Ersteller nur schneller ist als Herr Kasakow mit seinen Versprechungen

-
Moin, kannst nicht schlafen?
Meist mag meine Chefin das nicht so, vor allem wenn die Kunden warten..
-
-
Da es noch keiner hat, sag ich mal 2:1 für Italien