Beiträge von [RuS]Mixery

    ich mach das bei xampp https://localhost
    wen man kein Passwort setzt Steht dort Passwort zu kurz :/ und wen ich dort ein Passwort eingeben Steht da:(im script)
    [14:18:52] [ERROR] CMySQLHandle::Connect - (error #1045) Access denied for user 'samp' localhost (using password: YES)


    wen ich das passwort weg mache:(im script)
    [14:16:23] [ERROR] CMySQLHandle::Connect - (error #1044) Access denied for user '' localhost to database 'samp'


    //Includes
    #include <a_samp>
    #include <ocmd>
    #include <sscanf2>
    #include <a_mysql>


    //enums
    enum playerInfo{
    eingeloggt,
    level,
    id
    }


    //Globale Variablen
    new dbhandle;
    new sInfo[MAX_PLAYERS][playerInfo];


    //Farben
    #define COLOR_RED 0xFF0000FF


    //Dialoge
    #define DIALOG_TELEPORT 1
    #define DIALOG_REGISTER 2
    #define DIALOG_LOGIN 3


    //MySQL
    #define mysql_host "127.0.0.1"
    #define mysql_user "samp"
    #define mysql_pass "serverpassword"
    #define mysql_db "samp"


    //Forwards
    forward OnUserCheck(playerid);
    forward OnPasswordResponse(playerid);


    main()
    {


    }


    public OnGameModeInit()
    {
    SetGameModeText("San Andreas");
    dbhandle = mysql_connect(mysql_host,mysql_user,mysql_db,mysql_pass);
    return 1;
    }


    public OnGameModeExit()
    {
    mysql_close(dbhandle);
    return 1;
    }


    public OnPlayerRequestClass(playerid, classid)
    {
    SetPlayerPos(playerid,199.0846,-150.0331,1.5781);
    SetPlayerCameraPos(playerid, 199.2307,-143.8328,1.5781);
    SetPlayerCameraLookAt(playerid, 199.0846,-150.0331,1.5781);
    SetPlayerFacingAngle(playerid,359.1443);
    return 1;
    }


    public OnUserCheck(playerid)
    {
    new num_rows,num_fields;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==0)
    {
    //Registrierung
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
    }
    else
    {
    //Login
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }


    public OnPlayerConnect(playerid)
    {
    new nachricht[128];
    format(nachricht,sizeof(nachricht),"Du bist mit der ID %i verbunden.",playerid);
    SendClientMessage(playerid,COLOR_RED,nachricht);

    //Login/Register
    new name[MAX_PLAYER_NAME],query[128];
    GetPlayerName(playerid,name,sizeof(name));
    format(query,sizeof(query),"SELECT id FROM user WHERE username='%s'",name);
    mysql_function_query(dbhandle,query,true,"OnUserCheck","i",playerid);
    return 1;
    }


    savePlayer(playerid)
    {
    if(sInfo[playerid][eingeloggt]==0)return 1;
    //Speichern level,money
    new query[128];
    format(query,sizeof(query),"UPDATE user SET level='%i',money='%i' WHERE id='%i'",sInfo[playerid][level],GetPlayerMoney(playerid),sInfo[playerid][id]);
    mysql_function_query(dbhandle,query,false,"","");
    return 1;
    }


    resetPlayer(playerid)
    {
    sInfo[playerid][level]=0;
    sInfo[playerid][eingeloggt]=0;
    sInfo[playerid][id]=0;
    return 1;
    }


    public OnPlayerDisconnect(playerid, reason)
    {
    savePlayer(playerid);
    resetPlayer(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;
    }


    public OnPlayerCommandText(playerid, cmdtext[])
    {
    return 0;
    }


    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 OnPlayerUpdate(playerid)
    {
    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;
    }


    SetPlayerMoney(playerid,money)
    {
    ResetPlayerMoney(playerid);
    GivePlayerMoney(playerid,money);
    return 1;
    }


    public OnPasswordResponse(playerid)
    {
    new num_fields,num_rows;
    cache_get_data(num_rows,num_fields,dbhandle);
    if(num_rows==1)
    {
    //Passwort richtig
    sInfo[playerid][eingeloggt] = 1;
    sInfo[playerid][level] = cache_get_field_content_int(0,"level",dbhandle);
    SetPlayerScore(playerid,sInfo[playerid][level]);
    sInfo[playerid][id] = cache_get_field_content_int(0,"id",dbhandle);
    SetPlayerMoney(playerid,cache_get_field_content_int(0,"money",dbhandle));
    }
    else
    {
    //Passwort falsch
    SendClientMessage(playerid,COLOR_RED,"Das eingegebene Passwort ist falsch.");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    return 1;
    }


    public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
    {
    if(dialogid==DIALOG_LOGIN)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>0)
    {
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"SELECT * FROM user WHERE username='%s' AND password='%s'",name,passwort);
    mysql_function_query(dbhandle,query,true,"OnPasswordResponse","i",playerid);
    }
    else
    {
    //Keine Eingabe
    SendClientMessage(playerid,COLOR_RED,"Gibt bitte dein Passwort ein.");
    ShowPlayerDialog(playerid,DIALOG_LOGIN,DIALOG_STYLE_PASSWORD,"Login","Gibt bitte dein Passwort ein:","Okay","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }
    if(dialogid==DIALOG_REGISTER)
    {
    if(response)
    {
    new name[MAX_PLAYER_NAME],query[128],passwort[35];
    GetPlayerName(playerid,name,sizeof(name));
    if(strlen(inputtext)>3)
    {
    //Registrierungsfunktion
    mysql_escape_string(inputtext,passwort,dbhandle);
    format(query,sizeof(query),"INSERT INTO user (username,password) VALUES ('%s','%s') ",name,passwort);
    mysql_function_query(dbhandle,query,false,"","");
    }
    else
    {
    //Kleiner als 4 Zeichen
    SendClientMessage(playerid,COLOR_RED,"Dein Passwort muss mindestens 4 Zeichen lang sein.");
    ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Registrierung","Gib bitte dein gewünschtes Passwort an:","Okay","Abbrechen");
    }
    }
    else
    {
    Kick(playerid);
    }
    return 1;
    }
    if(dialogid==DIALOG_TELEPORT)
    {
    if(response)
    {
    if(listitem==0)
    {
    //Spawn
    SetPlayerPos(playerid,199.0846,-150.0331,1.5781);
    }
    if(listitem==1)
    {
    //Farm
    SetPlayerPos(playerid,0.0,0.0,6.0);
    }
    }
    else
    {
    SendClientMessage(playerid,COLOR_RED,"Vorgang abgebrochen.");
    }
    return 1;
    }
    return 1;
    }


    public OnPlayerClickPlayer(playerid, clickedplayerid, source)
    {
    return 1;
    }

    Hallo,


    C:\Users\Nick\Desktop\---\gamemodes\-.pwn(23891) : error 001: expected token: ")", but found "["
    C:\Users\Nick\Desktop\---\gamemodes\-.pwn(23891) : error 029: invalid expression, assumed zero
    C:\Users\Nick\Desktop\---\gamemodes\-.pwn(23891) : warning 215: expression has no effect
    C:\Users\Nick\Desktop\---\gamemodes\-.pwn(23891) : error 001: expected token: ";", but found "]"
    C:\Users\Nick\Desktop\---\gamemodes\-.pwn(23891) : fatal error 107: too many error messages on one line


    Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase



    4 Errors.




    if(FightSystem[TempZone][fsOwnerFaction] == GetPlayerFaction(playerid) || FightSystem[TempZone][fsAttackFaction] == GetPlayerFaction(playerid)){
    if(IsPlayerInRangeOfPoint(playerid,5.0,FightSystem[TempZone][fsCTFx],FightSystem[TempZone][fsCTFy],FightSystem[TempZone][fsCTFz])){
    if(FightSystem[TempZone][fsCTF][0] != -255){//[size=36]Error&WarningZeile[/size]
    if(GetPlayerFaction(FightSystem[TempZone][fsCTF][0]) != GetPlayerFaction(playerid))
    SendClientMessage(playerid,FS_COL_GREY,"Gangwar: Deine Gegnerische Fraktion greift schon diese Flagge an, tötet ihn!");
    else
    SendClientMessage(playerid,FS_COL_GREY,"Gangwar: Deine Fraktion greift schon die Flagge an.");
    return 1;
    }
    FightSystem[TempZone][fsCTF][0] = playerid;
    new fsName[MAX_PLAYER_NAME];
    new labeltext[128];
    GetPlayerName(playerid,fsName,MAX_PLAYER_NAME);
    new fsText[128];
    format(labeltext,sizeof(labeltext),"%s\nerobert die Flagge 1\nEinnahme in %d Sekunden",fsName,30);
    Update3DTextLabelText(FightSystem[TempZone][flag3d], GetZoneColorOfFaction(GetPlayerFaction(playerid)), labeltext);
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    if(GetPlayerFaction(i) == FightSystem[TempZone][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[TempZone][fsAttackFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsText);
    }
    }
    }

    Ja, ansonsten können wir dir schlecht helfen.


    Die Variablen für den Gangwar sollten auch schon reichen.


    Du kannst beim GMX ja mit ner Variable sofern du eine hast den Gangwar beenden.


    Beim GMx befehl hab ich Fight_Close(); gemacht, bekomme trz exe.

    Hei,
    Ich hab mir den RGR Gangwar eingefügt, alles funktioniert, ja, aber wenn ich /gmx eingebe, und dabei einen Gangwar habe, und Online komme bekomme ich einen Crash. Damit es weitergeht muss ich meine Fraktion wechseln oder den Gangwar beenden, kann mir einer helfen?

    Hi,
    Kann mir hier jmd pls weiter helfen?
    Mysql_log.txt =
    [18:03:04] [ERROR] CMySQLHandle::Connect - (error #1045) Access denied for user 'reallife' localhost (using password: YES)
    //MySQL
    #define db_host "127.0.0.1"
    #define db_user "samp"
    #define db_pass "password"
    #define db_db "script"


    das User'reallife' hab ich bei "https://local gelöscht & "samp" hinzugefügt" & dan kommt dieser fehler


    Jo, läuft nicht :(

    dcmd_showfinanzen(playerid,params[])
    {
    new info[64],string[24], string2[24]
    new name[MAX_PLAYERS],showid;
    if(sscabf(params,"u",showid))return SendClientMessage(playerid,-1,"Benutze: /showfinanzen [Name/ID]");
    if(playerid == showid)return SendClientMessage(playerid,-1,"Nutze /stats"); // Falls er seine ID angibt kommt diese Message
    GetPlayerName(playerid,name,sizeof(name));
    format(info,sizeof(info),"Finanz Informationen von %s",name); // Name des Befehl ausführers
    format(string,sizeof(string),"Bargeld: %d",GetPVarInt(playerid,"Geld")); // ggf anpassen
    format(string2,sizeof(string2),"Kontostand: %d",GetPVarInt(playerid,"Kontostand")); // ggf anpassen
    SendClientMessage(playerid,-1,info);
    SendClientMessage(playerid,-1,string);
    SendClientMessage(playerid,-1,string2);
    return 1;
    }


    Funkt nicht


    Kannst du es einmal in Dini vorschreiben?
    MFG

    Guten Abend, Community.


    Ich habe leider heut zu tage ein Problem mit dem RGR Gangfight wen man ein Gangfight Startet & dan off geht, Geht das Gangfight system aus. "-255"
    forward GW_OnPlayerDisconnect(playerid);
    public GW_OnPlayerDisconnect(playerid){
    for(new fs;fs<sizeof(FightSystem);fs++){
    if(FightSystem[fs][fsAttackFaction] != -255 && FightSystem[fs][fsFightTime]){
    if(FightSystem[fs][fsCTF][0] != -255 && FightSystem[fs][fsCTF][0] == playerid){
    new fsName[MAX_PLAYER_NAME];
    GetPlayerName(FightSystem[fs][fsCTF][0],fsName,MAX_PLAYER_NAME);
    new fsText[128];
    format(fsText,sizeof(fsText),">>> Fight <<< | %s hat es nicht geschafft die Flagge zu erobern!",fsName);
    for(new i;i<MAX_PLAYERS;i++){
    if(IsPlayerConnected(i)){
    if(GetPlayerFaction(i) == FightSystem[fs][fsOwnerFaction] || GetPlayerFaction(i) == FightSystem[fs][fsAttackFaction]){
    PlayerPlaySound(i,1058,0.0,0.0,0.0);
    SendClientMessage(i,FS_COL_YELLOW,fsText);
    }
    }
    }
    FightSystem[fs][fsCTF][0] = -255;
    FightSystem[fs][fsCTF][1] = 0;
    FightSystem[fs][fsCTF][2] = 0;
    }
    if(GetPVarInt(playerid,"Spawned")==1){
    GangZoneStopFlashForPlayer(playerid,FightSystem[fs][fsZoneID]);
    if(GetPlayerFaction(playerid) == FightSystem[fs][fsOwnerFaction] || GetPlayerFaction(playerid) == FightSystem[fs][fsAttackFaction]){
    TextDrawHideForPlayer(playerid,Fight);
    TextDrawHideForPlayer(playerid,FightUnderline);
    TextDrawHideForPlayer(playerid,FightSystem[fs][fsWinFaction]);
    TextDrawHideForPlayer(playerid,FightSystem[fs][fsLoseFaction]);
    TextDrawHideForPlayer(playerid,FightSystem[fs][fsWinKills]);
    TextDrawHideForPlayer(playerid,FightSystem[fs][fsLoseKills]);
    TextDrawHideForPlayer(playerid,FightSystem[fs][fsTime]);
    }
    }
    }GangZoneHideForPlayer(playerid,FightSystem[fs][fsZoneID]);
    }DeletePVar(playerid,"Spawned");
    return 1;
    }