bitte um hilfe bei mysql.
[16:22:54] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
bitte um hilfe bei mysql.
[16:22:54] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
Hallo.
Ich kann das nicht nutzen bei mir steht im server.log
[16:22:54] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
und ich kann meine mysql datenbank nicht an das neue anpassen und weiß auch nicht was ich wie machen muss
wie kann ich das raus finden ?
kenne mich nicht mit mysql aus
Hallo.
Ich starte mein server aber mein mysql leuft nicht mit steht im log:
[16:22:54] Failed (libmysqlclient_r.so.16: cannot open shared object file: No such file or directory)
woran liegt das?
Du hast die Variable / schon genutzt, alles was du dahinter schreibst schreibt der in den Befehl / sprich in den Admin Chat. Ich empfehle dir für den AdminChat #, den benutze ich auch
Ich verstehe nicht so ganz was du meinst
bitte umhilfe
//edit
Hallo.
Bei mir auf server wird bei /dtdcamenu bei updates angezeigt version 1.2.2 und unten steht dann es wird keine neue version benötig aber hier steht 1.3.0 wo finde ich die 1.3.0 und kann ich die 1.3.0 einfach mit der 1.2.2 ersätzen ohne das meine autoheuser auf dem server weg sind ?
habe glaubich noch was einfacheres gefunden:
http://www.roxx4berlin.de/info…k-3-server-mit-mysql.html
Hallo.
Kann mir jemand sagen wie ich mein Teamspeak³ server auf mysql einstellen kann oder mir eine seite sagen kann für ein gutes tut ?
MFG Timo Scholz
Aber irgendwie geht das doch ohne ocmd, ich habe nemlich mehren befehle drinne will aber nicht alle umschreib vorallem weil ich mich mit ocmd, sccanf nicht auskenne.
Ich muss dazu sagen ich habe ein neues script angefangen und das ist ja leer und da habe ich einfach vom GF die befehle genommen aus OnPlayerCommandText
Ich brauch dringen daran hilfe
//edit
Das soll ein dm script werden und das war vorher blank gewesehen nur die public waren dirnne und ich habe aus meinen alten GF Script das login system raus genommen und da rein gemacht und immer wenn ich zu skin wahl komme will er das ich mich neu register
#include <a_samp>
#include <ocmd>
#include <dini>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
//#include <morphinc>
//#include <streamer>
#pragma tabsize 0
#pragma dynamic 8192
#define DIALOG_LOGIN 0
#define DIALOG_REG 1
#define DIALOG_REG2 2
#define F_G 0x24D900F6 //helles Grün
#define F_O 0xF6B400F6 //Neues Orange
#define blau 0x0085C4F6
#define NB 0x005B9BF6 // Neues Blau
#define NY 0xF5DEB3AA // Neues Gelb
#define RED_NEW 0xF60000F6
#define BLUE_NEW 0x0000CAF6
#define GREEN 0x21DD00FF
#define ORANGE 0xF97804FF
#define RED 0xE60000FF
#define MAX_STRING 255
#define CHECKPOINT_NONE 0
#define CHECKPOINT_HOME 12
#define COLOR_GOLD 0xB8860BAA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_ORANGE 0xFF9933FF
#define COLOR_BROWN 0x330000FF
#define COLOR_BLACK 0x000000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTRED 0xFF6347AA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_LIGHTGREEN 0x9ACD32AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_YELLOW2 0xF5DEB3AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_ALLDEPT 0xFF8282AA
#define COLOR_NEWS 0xFFA500AA
#define COLOR_OOC 0xE0FFFFAA
#define TEAM_CYAN 1
#define TEAM_BLUE 2
#define TEAM_GREEN 3
#define TEAM_ORANGE 4
#define TEAM_COR 5
#define TEAM_BAR 6
#define TEAM_TAT 7
#define TEAM_CUN 8
#define TEAM_STR 9
#define TEAM_HIT 10
#define TEAM_ADMIN 17
#define OBJECTIVE_COLOR 0x64000064
#define TEAM_GREEN_COLOR 0xFFFFFFAA
#define TEAM_JOB_COLOR 0xFFB6C1AA
#define TEAM_HIT_COLOR 0xFFFFFF00
#define TEAM_BLUE_COLOR 0x8D8DFF00
#define COLOR_ADD 0x63FF60AA
#define TEAM_GROVE_COLOR 0x00D900C8
#define TEAM_VAGOS_COLOR 0xFFC801C8
#define TEAM_BALLAS_COLOR 0xD900D3C8
#define TEAM_AZTECAS_COLOR 0x01FCFFC8
#define TEAM_CYAN_COLOR 0xFF8282AA
#define TEAM_ORANGE_COLOR 0xFF830000
#define TEAM_COR_COLOR 0x39393900
#define TEAM_BAR_COLOR 0x00D90000
#define TEAM_TAT_COLOR 0xBDCB9200
#define TEAM_CUN_COLOR 0xD900D300
#define TEAM_STR_COLOR 0x01FCFF00
#define TEAM_ADMIN_COLOR 0x00808000
#define COLOR_INVIS 0xAFAFAF00
#define COLOR_SPEC 0xBFC0C200
#define MAX_SERVER_NAMES 3
#define rot 0xFF0000FF
#pragma tabsize 0
#pragma dynamic 8192
forward OnPlayerRegister(playerid, password[]);
forward OnPlayerUpdate(playerid);
forward OnPlayerLogin(playerid,password[]);
forward ini_GetKey( line[] );
forward ini_GetValue( line[] );
forward strtok(const string[], &index);
forward SaveAccounts();
forward SendAdminMessage(color, string[]);
forward ABroadCast(color,const string[],level);
forward KickLog(string[]);
forward BanLog(string[]);
main ()
{
}
new CreatedCar = 0;
new CreatedCars[100];
new Spectate[MAX_PLAYERS];
new gPlayerLogged[MAX_PLAYERS];
new gPlayerAccount[MAX_PLAYERS];
new gPlayerLogTries[MAX_PLAYERS];
new gActivePlayers[MAX_PLAYERS];
new pIP[MAX_PLAYERS][16];
new numplayers = 0;
new Float:TeleportDest[MAX_PLAYERS][3];
new Float:TelePos[MAX_PLAYERS][6];
enum pInfo
{
pKey[128],
pMuted,
pAdmin,
pLocal,
pInt
};
new PlayerInfo[MAX_PLAYERS][pInfo];
public ABroadCast(color,const string[],level)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if (PlayerInfo[i][pAdmin] >= level)
{
SendClientMessage(i, color, string);
printf("%s", string);
}
}
}
return 1;
}
public OnGameModeInit()
{
AddStaticVehicleEx(411,2039.5369,1359.2540,10.3990,182.7444,112,1,200000); // auto1
AddStaticVehicleEx(411,2039.8292,1292.2549,10.3990,178.4604,112,1,200000); // auto 2
AddStaticVehicleEx(415,2040.6342,1327.3977,10.4442,359.2556,92,1,200000); // auto 3
AddStaticVehicleEx(415,2039.8578,1209.3940,10.4452,183.9225,92,1,200000); // auto 5
AddStaticVehicleEx(451,2024.0121,1334.2314,10.1838,270.1386,16,16,200000); // auto 6
SetGameModeText("dm server");
AddPlayerClass(105, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(106, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(107, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(102, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(103, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(104, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(114, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(115, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(116, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(108, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(109, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(110, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(173, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(174, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(175, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(117, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(118, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(119, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(124, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(125, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
AddPlayerClass(126, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
if(IsPlayerNPC(playerid))return 1;
SetPlayerPos(playerid,2047.4270,1336.5569,10.6719);
SetPlayerFacingAngle(playerid,188.9284);
SetPlayerCameraPos(playerid,2047.6205,1333.3314,10.6719);
SetPlayerCameraLookAt(playerid,2047.4270,1336.5569,10.6719);
if(gPlayerAccount[playerid] == 1 && gPlayerLogged[playerid] == 0)
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte logge dich in deinen Account ein!","Login","Abbrechen");
}
else if(gPlayerAccount[playerid] == 0 && gPlayerLogged[playerid] == 0)
{
ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Account","Du benötigst einen Account, um auf diesem Server zu spielen!","Erstellen","Abbrechen");
}
return 1;
}
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_WHITE, " ");
SendClientMessage(playerid, COLOR_YELLOW, "Bitte Warten...");
new joiner[256];
GetPlayerName(playerid,joiner,sizeof(joiner));
format(joiner,sizeof(joiner),"*** %s (ID: %d) hat den Server betreten!! Herzlich Willkomen!!",joiner,playerid);
SendClientMessageToAll(COLOR_LIGHTBLUE,joiner);
gActivePlayers[playerid]++;
numplayers++;
new string[64];
new plname[MAX_PLAYER_NAME];
gPlayerLogged[playerid] = 0; gPlayerLogTries[playerid] = 0;
PlayerInfo[playerid][pAdmin] = 0;
PlayerInfo[playerid][pInt] = 15;
PlayerInfo[playerid][pLocal] = 255;
GetPlayerIp(playerid,pIP[playerid],16);
GetPlayerName(playerid, plname, sizeof(plname));
format(string, sizeof(string), "/Accounts/%s.ini", plname);
if(fexist(string))
{
gPlayerAccount[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, " > > > Herzlich Willkommen < < < ");
SendClientMessage(playerid, COLOR_WHITE, "Dein Account wurde gefunden, du kannst dich einloggen.");
SendClientMessage(playerid, COLOR_WHITE, "Deinen Skin kannst du dir später auswählen.");
//SendClientMessage(playerid, COLOR_YELLOW, " > > > WIE LOGGE ICH MICH EIN? < < < ");
//SendClientMessage(playerid, COLOR_WHITE, "So loggst du dich ein: /login [dein passwort]");
return 1;
}
else
{
gPlayerAccount[playerid] = 0;
SendClientMessage(playerid, COLOR_YELLOW, " > > > Herzlich Willkommen < < < ");
SendClientMessage(playerid, COLOR_WHITE, "Du hast hier noch kein Account. Also Registrier dich:");
SendClientMessage(playerid, COLOR_WHITE, "Deinen Skin kannst du nachher auswählen..");
//SendClientMessage(playerid, COLOR_YELLOW, " > > > WIE REGISTRIERE ICH MICH? < < < ");
//SendClientMessage(playerid, COLOR_WHITE, "So registrierst du dich: /register [gewünschtes passwort]");
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
numplayers--;
OnPlayerUpdate(playerid);
return 1;
}
public OnPlayerSpawn(playerid)
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
return 1;
}
public KickLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("log/kick.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public BanLog(string[])
{
new entry[256];
format(entry, sizeof(entry), "%s\n",string);
new File:hFile;
hFile = fopen("log/ban.log", io_append);
fwrite(hFile, entry);
fclose(hFile);
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
return 1;
}
public OnPlayerExitVehicle(playerid, vehicleid)
{
return 1;
}
public OnPlayerStateChange(playerid, newstate, oldstate)
{
return 1;
}
public OnPlayerEnterCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveCheckpoint(playerid)
{
return 1;
}
public OnPlayerEnterRaceCheckpoint(playerid)
{
return 1;
}
public OnPlayerLeaveRaceCheckpoint(playerid)
{
return 1;
}
public OnRconCommand(cmd[])
{
return 1;
}
public OnPlayerRequestSpawn(playerid)
{
return 1;
}
public OnObjectMoved(objectid)
{
return 1;
}
public OnPlayerObjectMoved(playerid, objectid)
{
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
return 1;
}
public OnVehicleMod(playerid, vehicleid, componentid)
{
return 1;
}
public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
{
return 1;
}
public OnVehicleRespray(playerid, vehicleid, color1, color2)
{
return 1;
}
public OnPlayerSelectedMenuRow(playerid, row)
{
return 1;
}
public OnPlayerExitedMenu(playerid)
{
return 1;
}
public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
{
return 1;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
return 1;
}
public OnRconLoginAttempt(ip[], password[], success)
{
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid)
{
return 1;
}
public OnPlayerStreamOut(playerid, forplayerid)
{
return 1;
}
public OnVehicleStreamIn(vehicleid, forplayerid)
{
return 1;
}
public OnVehicleStreamOut(vehicleid, forplayerid)
{
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid,sendername,sizeof(sendername));
if(dialogid == DIALOG_LOGIN)
{
if(response && strlen(inputtext) > 0)
{
//new str[512];
// mysql_query("SELECT * FROM `Accounts` WHERE `Spielername` = 'Maddin'");//Läd alles aus der Zeile des Spielers (in dem fall ich) aus der Tabelle 'Accounts'
// mysql_store_result();
// while(mysql_fetch_row(str))//Übergibt das was vorher aus der Tabelle geladen wurde an einen string.
// {
// sscanf(str, "e<p<|>{i}s[16]s[24]s[130]iiifff>",SpielerInfo[playerid]);//teilt den string in seine bestandteile so wie wir es wollen und gibt es an das enum weiter
// }
// mysql_free_result();
// LoadUserData();
OnPlayerLogin(playerid,inputtext);
}
else
{
Kick(playerid);
}
}
if(dialogid == DIALOG_REG)
{
if(response)
{
ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_INPUT,"Account erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
}
else
{
ShowPlayerDialog(playerid,DIALOG_REG,DIALOG_STYLE_MSGBOX,"Account","Du benötigst einen Account, um auf diesem Server zu spielen!","Erstellen","Abbrechen");
}
}
if(dialogid == DIALOG_REG2)
{
if(response && strlen(inputtext) > 0)
{
OnPlayerRegister(playerid,inputtext);
}
else
{
ShowPlayerDialog(playerid,DIALOG_REG2,DIALOG_STYLE_INPUT,"Account erstellen","Gib das Passwort für deinen Account ein:","OK","Abbrechen");
}
}
return 1;
}
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
public SaveAccounts()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
OnPlayerUpdate(i);
}
}
}
public OnPlayerRegister(playerid, password[])
{
if(IsPlayerConnected(playerid))
{
new string3[64];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Accounts/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
strmid(PlayerInfo[playerid][pKey], password, 0, strlen(password), 255);
new var[32];
format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
fclose(hFile);
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Bitte logge dich nun in deinen Account ein!","Login","Abbrechen");
}
}
return 1;
}
public OnPlayerUpdate(playerid)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
//M_OnPlayerUpdate(playerid);
new string3[64];
new playername3[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername3, sizeof(playername3));
format(string3, sizeof(string3), "/Accounts/%s.ini", playername3);
new File: hFile = fopen(string3, io_write);
if (hFile)
{
new var[32];
format(var, 32, "Key=%s\n", PlayerInfo[playerid][pKey]);fwrite(hFile, var);
//PlayerInfo[playerid][pCash] = GetPlayerMoney(playerid);
format(var, 32, "AdminLevel=%d\n",PlayerInfo[playerid][pAdmin]);fwrite(hFile, var);
format(var, 32, "Muted=%d\n",PlayerInfo[playerid][pMuted]);fwrite(hFile, var);
fclose(hFile);
}
}
}
return 1;
}
public OnPlayerLogin(playerid,password[])
{
new string2[128];
new playername2[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername2, sizeof(playername2));
format(string2, sizeof(string2), "/Accounts/%s.ini", playername2);
new File: UserFile = fopen(string2, io_read);
if ( UserFile )
{
new PassData[256];
new keytmp[256], valtmp[256];
fread( UserFile , PassData , sizeof( PassData ) );
keytmp = ini_GetKey( PassData );
if( strcmp( keytmp , "Key" , true ) == 0 )
{
valtmp = ini_GetValue( PassData );
strmid(PlayerInfo[playerid][pKey], valtmp, 0, strlen(valtmp)-1, 255);
}
if(strcmp(PlayerInfo[playerid][pKey],password, true ) == 0 )
{
new key[ 256 ] , val[ 256 ];
new Data[ 256 ];
while ( fread( UserFile , Data , sizeof( Data ) ) )
{
key = ini_GetKey( Data );
// if( strcmp( key , "Level" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pLevel] = strval( val ); }
if( strcmp( key , "AdminLevel" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pAdmin] = strval( val ); }
if( strcmp( key , "Muted" , true ) == 0 ) { val = ini_GetValue( Data ); PlayerInfo[playerid][pMuted] = strval( val ); }
}//end while
fclose(UserFile);//close the file after everything has been read in the while
}
else
{
ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_INPUT,"Login","Das Passwort ist nicht korrekt! Bitte gib nun dein richtiges Passwort ein:","Login","Abbrechen");
fclose(UserFile);
gPlayerLogTries[playerid] += 1;
if(gPlayerLogTries[playerid] == 4) { Ban(playerid); }
return 1;
}
if (PlayerInfo[playerid][pAdmin] > 0)
{
format(string2, sizeof(string2), "SERVER: Du bist als Level %d Admin eingeloggt.",PlayerInfo[playerid][pAdmin]);
SendClientMessage(playerid, COLOR_WHITE,string2);
}
}
return 1;
}
stock ini_GetKey( line[] )
{
new keyRes[256];
keyRes[0] = 0;
if ( strfind( line , "=" , true ) == -1 ) return keyRes;
strmid( keyRes , line , 0 , strfind( line , "=" , true ) , sizeof( keyRes) );
return keyRes;
}
public SendAdminMessage(color, string[])
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pAdmin] >= 1)
{
SendClientMessage(i, color, string);
}
}
}
}
//edit
wie müsste ich das bei machen ?
if(strcmp(cmd, "/admin", true) == 0 strcmp(cmd, "/a", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "BENUTZUNG: (/a)dmin [admin chat]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
SendAdminMessage(COLOR_LIGHTBLUE, string);
}
else
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du wurdest gemutet !");
return 1;
}
format(string, sizeof(string), "*Zivilist %s: %s", sendername, result);
SendAdminMessage(COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Deine Nachricht wurde an die Admins gesendet.");
}
printf("Zivilist %s: %s", sendername, result);
//Log("OA-Chat.txt",string);
}
return 1;
}
ich kenne mich mit Ocmd nicht aus
habs raus genommen und er finde im script kein ocmd aber er macht auf server immer noch das gleiche problem
kann es davon kommen?
#include <ocmd>
ja z.B der /a chat ist gearde ganz oben,
und so bald ich /kick 2 mache steht dann im /a chatt:
1337 Eli: /kick 2
aber nur wenn ich das / mache steht es im /a und wenn ich z.B nur kick 2 mache steht es im öffendlichen chat
Immer wenn ich auf server / benutze wird der obere command genommen aber wieso ?
cod:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
// new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
// new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, idx;
/*if(strcmp(cmd, "/restart", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 3)
{
GameTextForPlayer(playerid, "~r~ Server Neustart", 5000, 1);
GameModeExit();
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Das darfst du nicht tun !");
}
}
return 1;
}*/
/*if(strcmp(cmd, "/getip", true) == 0)
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
// new tmp[256];
tmp = strtok(cmdtext,idx);
if(!strlen(tmp))
{
SendClientMessage(playerid,COLOR_GRAD1,"FEHLER: /getip [playerid]");
return 1;
}
giveplayerid = ReturnUser(tmp);
new playersip[16];
GetPlayerIp(giveplayerid,playersip,sizeof(playersip));
format(string,sizeof(string),"IP: %s",playersip);
SendClientMessage(playerid,COLOR_GRAD2,string);
}
return 1;
}*/
if(strcmp(cmd, "/admin", true) == 0 strcmp(cmd, "/a", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "BENUTZUNG: (/a)dmin [admin chat]");
return 1;
}
if (PlayerInfo[playerid][pAdmin] >= 1)
{
format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sFendername, result);
SendAdminMessage(COLOR_LIGHTBLUE, string);
}
else
{
if(PlayerInfo[playerid][pMuted] == 1)
{
SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du wurdest gemutet !");
return 1;
}
format(string, sizeof(string), "*Zivilist %s: %s", sendername, result);
SendAdminMessage(COLOR_LIGHTBLUE, string);
SendClientMessage(playerid, COLOR_LIGHTBLUE, " Deine Nachricht wurde an die Admins gesendet.");
}
printf("Zivilist %s: %s", sendername, result);
//Log("OA-Chat.txt",string);
}
return 1;
}
if(strcmp(cmd, "/mute", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /mute [playerid]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[playa][pMuted] == 0)
{
PlayerInfo[playa][pMuted] = 1;
printf("AdmCmd: %s silenced %s",sendername, giveplayer);
format(string, sizeof(string), "AdmCmd: %s wurde von %s zum Schweigen gebracht",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
else
{
PlayerInfo[playa][pMuted] = 0;
printf("AdmCmd: %s unsilenced %s",sendername, giveplayer);
format(string, sizeof(string), "AdmCmd: %s wurde von %s zum Reden gebracht",giveplayer ,sendername);
ABroadCast(COLOR_LIGHTRED,string,1);
}
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!");
}
}
return 1;
}
if(strcmp(cmd, "/makeadmin", true) == 0)
{
if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid,COLOR_GRAD2," Das Vergeben und Entziehen von Adminrechten ist nur den Admins erlaubt!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /makeadmin [ID] [Level]");
return 1;
}
new para1 = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
new level = strval(tmp);
if(IsPlayerConnected(para1))
{
if(para1 != INVALID_PLAYER_ID)
{
GetPlayerName(para1, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
if(PlayerInfo[para1][pAdmin] < level)
{
printf("AdmCmd: %s hat %s zu einem Level %d Admin befördert.", sendername, giveplayer, level);
format(string, sizeof(string), " Du wurdest durch %s zu einem Level %d Admin befördert", sendername, level);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Du hast %s zu einem Level %d Admin befördert.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
else
{
printf("AdmCmd: %s hat %s zu einem Level %d Admin degradiert.", sendername, giveplayer, level);
format(string, sizeof(string), " Du wurdest durch %s zu einem Level %d Admin degradiert", sendername, level);
SendClientMessage(para1, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), " Du hast %s zu einem Level %d Admin degradiert.", giveplayer,level);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
PlayerInfo[para1][pAdmin] = level;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht befugt diesen Befehl zu nutzen! ");
}
return 1;
}
etc
if(strcmp(cmd, "/setplayerint", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /setplayerint [playerid] [interiorid]");
return 1;
}
new playa;
playa = ReturnUser(tmp);
new intid;
tmp = strtok(cmdtext, idx);
intid = strval(tmp);
if (PlayerInfo[playerid][pAdmin] >= 1)
{
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
SetPlayerInterior(playa, intid);
PlayerInfo[playa][pInt] = intid;
format(string, sizeof(string), " Du hast %s den interior auf %d gesetzt.", giveplayer, intid);
SendClientMessage(playerid, COLOR_GRAD1, string);
format(string, sizeof(string), " %s hat deinen Interior auf %d gesetzt.", sendername, intid);
SendClientMessage(playa, COLOR_GRAD1, string);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!");
}
}
return 1;
}
return 1;
}
Poste bitte nocheinmal ohne pwn Tag bei mir klatscht der das auch immer in ein paar Zeilen
eh wie meinst du das?
Hallo.
Ich habe ein Problem mit den Befehlen und zwar immer wenn ich / eingebe kommt das was bei OnPlayerCommandText oben steht als befehl:
public OnPlayerCommandText(playerid, cmdtext[]){ new string[256];// new playermoney; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME];// new playername[MAX_PLAYER_NAME]; new cmd[256]; new tmp[256]; new giveplayerid, idx; /*if(strcmp(cmd, "/restart", true) == 0) { if(IsPlayerConnected(playerid)) { if (PlayerInfo[playerid][pAdmin] >= 3) { GameTextForPlayer(playerid, "~r~ Server Neustart", 5000, 1); GameModeExit(); } else { SendClientMessage(playerid, COLOR_GRAD1, " Das darfst du nicht tun !"); } } return 1; }*/ /*if(strcmp(cmd, "/getip", true) == 0) { if (PlayerInfo[playerid][pAdmin] >= 2) {// new tmp[256]; tmp = strtok(cmdtext,idx); if(!strlen(tmp)) { SendClientMessage(playerid,COLOR_GRAD1,"FEHLER: /getip [playerid]"); return 1; } giveplayerid = ReturnUser(tmp); new playersip[16]; GetPlayerIp(giveplayerid,playersip,sizeof(playersip)); format(string,sizeof(string),"IP: %s",playersip); SendClientMessage(playerid,COLOR_GRAD2,string); } return 1; }*/ if(strcmp(cmd, "/admin", true) == 0 || strcmp(cmd, "/a", true) == 0) { if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_LIGHTBLUE, "BENUTZUNG: (/a)dmin [admin chat]"); return 1; } if (PlayerInfo[playerid][pAdmin] >= 1) { format(string, sizeof(string), "*%d Admin %s: %s", PlayerInfo[playerid][pAdmin], sFendername, result); SendAdminMessage(COLOR_LIGHTBLUE, string); } else { if(PlayerInfo[playerid][pMuted] == 1) { SendClientMessage(playerid, TEAM_CYAN_COLOR, " Du kannst nicht sprechen, du wurdest gemutet !"); return 1; } format(string, sizeof(string), "*Zivilist %s: %s", sendername, result); SendAdminMessage(COLOR_LIGHTBLUE, string); SendClientMessage(playerid, COLOR_LIGHTBLUE, " Deine Nachricht wurde an die Admins gesendet."); } printf("Zivilist %s: %s", sendername, result); //Log("OA-Chat.txt",string); } return 1; } if(strcmp(cmd, "/mute", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /mute [playerid]"); return 1; } new playa; playa = ReturnUser(tmp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[playa][pMuted] == 0) { PlayerInfo[playa][pMuted] = 1; printf("AdmCmd: %s silenced %s",sendername, giveplayer); format(string, sizeof(string), "AdmCmd: %s wurde von %s zum Schweigen gebracht",giveplayer ,sendername); ABroadCast(COLOR_LIGHTRED,string,1); } else { PlayerInfo[playa][pMuted] = 0; printf("AdmCmd: %s unsilenced %s",sendername, giveplayer); format(string, sizeof(string), "AdmCmd: %s wurde von %s zum Reden gebracht",giveplayer ,sendername); ABroadCast(COLOR_LIGHTRED,string,1); } } } } else { SendClientMessage(playerid, COLOR_GRAD1, " Du darfst diesen Befehl nicht benutzen!"); } } return 1; } if(strcmp(cmd, "/makeadmin", true) == 0) { if(PlayerInfo[playerid][pAdmin] < 1337) { SendClientMessage(playerid,COLOR_GRAD2," Das Vergeben und Entziehen von Adminrechten ist nur den Admins erlaubt!"); return 1; } tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "Benutze: /makeadmin [ID] [Level]"); return 1; } new para1 = ReturnUser(tmp); tmp = strtok(cmdtext, idx); new level = strval(tmp); if(IsPlayerConnected(para1)) { if(para1 != INVALID_PLAYER_ID) { GetPlayerName(para1, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); if(PlayerInfo[para1][pAdmin] < level) { printf("AdmCmd: %s hat %s zu einem Level %d Admin befördert.", sendername, giveplayer, level); format(string, sizeof(string), " Du wurdest durch %s zu einem Level %d Admin befördert", sendername, level); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " Du hast %s zu einem Level %d Admin befördert.", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } else { printf("AdmCmd: %s hat %s zu einem Level %d Admin degradiert.", sendername, giveplayer, level); format(string, sizeof(string), " Du wurdest durch %s zu einem Level %d Admin degradiert", sendername, level); SendClientMessage(para1, COLOR_LIGHTBLUE, string); format(string, sizeof(string), " Du hast %s zu einem Level %d Admin degradiert.", giveplayer,level); SendClientMessage(playerid, COLOR_LIGHTBLUE, string); } PlayerInfo[para1][pAdmin] = level; } } else { SendClientMessage(playerid, COLOR_GRAD1, " Du bist nicht befugt diesen Befehl zu nutzen! "); } return 1; }
etc
if(strcmp(cmd, "/setplayerint", true) == 0) { if(IsPlayerConnected(playerid)) { tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_GRAD2, "FEHLER: /setplayerint [playerid] [interiorid]"); return 1; } new playa; playa = ReturnUser(tmp); new intid; tmp = strtok(cmdtext, idx); intid = strval(tmp); if (PlayerInfo[playerid][pAdmin] >= 1) { if(IsPlayerConnected(playa)) { if(playa != INVALID_PLAYER_ID) { GetPlayerName(playa, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerInterior(playa, intid); PlayerInfo[playa][pInt] = intid; format(string, sizeof(string), " Du hast %s den interior auf %d gesetzt.", giveplayer, intid); SendClientMessage(playerid, COLOR_GRAD1, string); format(string, sizeof(string), " %s hat deinen Interior auf %d gesetzt.", sendername, intid); SendClientMessage(playa, COLOR_GRAD1, string); } } } else { SendClientMessage(playerid, COLOR_GRAD1, " You are not authorized to use that command!"); } } return 1; } return 1;}
Welchen cod soll ich denn posten den Vom login?