Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
shapeshifting

pomoc Pomoc - Reg/Log system :)

Dotaz

Ahojte pomožete mi ? uz si s tym lamem hlavu 2 hodky cca a neviem proste no  --> odkaz na mod http://leteckaposta.cz/174875031

Error:

Spoiler

 

C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(9) : warning 201: redefinition of constant/macro (symbol "DIALOG_STYLE_INPUT")
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(15) : error 010: invalid function or declaration
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(17) : error 031: unknown directive
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(114) : warning 217: loose indentation
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(118) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(119) : warning 215: expression has no effect
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(126) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(127) : warning 215: expression has no effect
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(179) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(184) : error 010: invalid function or declaration
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(186) : error 010: invalid function or declaration
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(265) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(265) : error 035: argument type mismatch (argument 7)
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(289) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(295) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(318) : error 029: invalid expression, assumed zero
C:\Users\Domov\Desktop\ThaDonMachiaveceliTEST.pwn(322) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase


13 Errors.

 

 

Mod:

Spoiler

 

#pragma tabsize 0
#include <a_samp>
#include <a_samp>
#include <dof2>
#include <dudb>
#define Hesla "/Ucty/Hesla/%s.txt"
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#define DIALOG_STYLE_PASSWORD
#define DIALOG_STYLE_INPUT
#define Login
#define Quit
#define PlayAudioStreamForPlayer
#define SHOW_PLAYER_DIALOG

if(User[playerid][USER_RANGO] == 6 && User[playerid][USER_FACCION] >= 1)

#forward OnPlayerInfoChange();
#forward OnPlayerInfoChange(playerid);
#forward OnPlayerPrivmsg(playerid, recieverid, text[]);

#pragma unused ret_memcpy

new Text:TDEditor_TD0;
new Text:TDEditor_TD1;
new Text:TDEditor_TD2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Test Reg/Log system");
    print("--------------------------------------\n");
    TDEditor_TD0 = TextDrawCreate(291.405975, -1.333245, "_");
    TextDrawLetterSize(TDEditor_TD0, 0.384538, 7.911665);
    TextDrawTextSize(TDEditor_TD0, 8.760105, 1072.000000);
    TextDrawAlignment(TDEditor_TD0, 2);
    TextDrawColor(TDEditor_TD0, -1);
    TextDrawUseBox(TDEditor_TD0, 1);
    TextDrawBoxColor(TDEditor_TD0, 255);
    TextDrawSetShadow(TDEditor_TD0, 87);
    TextDrawSetOutline(TDEditor_TD0, 212);
    TextDrawBackgroundColor(TDEditor_TD0, 255);
    TextDrawFont(TDEditor_TD0, 1);
    TextDrawSetProportional(TDEditor_TD0, 0);
    TextDrawSetShadow(TDEditor_TD0, 87);

    TDEditor_TD1 = TextDrawCreate(280.630065, 375.500213, "_");
    TextDrawLetterSize(TDEditor_TD1, 0.384538, 7.911665);
    TextDrawTextSize(TDEditor_TD1, 8.760105, 1072.000000);
    TextDrawAlignment(TDEditor_TD1, 2);
    TextDrawColor(TDEditor_TD1, -1);
    TextDrawUseBox(TDEditor_TD1, 1);
    TextDrawBoxColor(TDEditor_TD1, 255);
    TextDrawSetShadow(TDEditor_TD1, 87);
    TextDrawSetOutline(TDEditor_TD1, 212);
    TextDrawBackgroundColor(TDEditor_TD1, 255);
    TextDrawFont(TDEditor_TD1, 1);
    TextDrawSetProportional(TDEditor_TD1, 0);
    TextDrawSetShadow(TDEditor_TD1, 87);

    TDEditor_TD2 = TextDrawCreate(227.218048, 24.916673, "NAZEV_SERVERU");
    TextDrawLetterSize(TDEditor_TD2, 0.648784, 3.349999);
    TextDrawAlignment(TDEditor_TD2, 1);
    TextDrawColor(TDEditor_TD2, -5963521);
    TextDrawSetShadow(TDEditor_TD2, 0);
    TextDrawSetOutline(TDEditor_TD2, 0);
    TextDrawBackgroundColor(TDEditor_TD2, 255);
    TextDrawFont(TDEditor_TD2, 2);
    TextDrawSetProportional(TDEditor_TD2, 1);
    TextDrawSetShadow(TDEditor_TD2, 0);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Destinyho gm");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    SetGameModeText("Ahojda!");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
new nick[MAX_PLAYER_NAME],  soubor[256];
    GetPlayerName(playerid, nick, sizeof(nick));
    format(soubor, sizeof(soubor), Hesla, nick);
    if (DOF2_FileExists(soubor))
    {
    ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD), "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru T&M&A! Zde zadej svoje heslo: {FF80C0}Login, Quit");
    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7r8pac2erw/Alesso_vs_OneRepublic_-_If_I_Lose_Myself_Alesso_Remix_.mp3");
    TextDrawShowForPlayer(playerid,TDEditor_TD0);
    TextDrawShowForPlayer(playerid,TDEditor_TD1);
    TextDrawShowForPlayer(playerid,TDEditor_TD2);
    }
    else
    {
    ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD), "{73C0E6}Registrace...","{66F2BE}Vítej na serveru XXX! Zde zadej svoje nové heslo:", "{FF80C0}REGISTRACE", "");
    PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7r8pac2erw/Alesso_vs_OneRepublic_-_If_I_Lose_Myself_Alesso_Remix_.mp3");
    TextDrawShowForPlayer(playerid,TDEditor_TD0);
    TextDrawShowForPlayer(playerid,TDEditor_TD1);
    TextDrawShowForPlayer(playerid,TDEditor_TD2);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    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[])
{
    dcmd(changepass,10,cmdtext);
    return 0;
}

    dcmd_changepass(playerid,params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT),"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje staré heslo","{FF80C0}Další","{FE635A}Zavřít");
    return 1;
}


    return 1;
    }
    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 OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 1)
    {
        new nick[MAX_PLAYER_NAME], soubor[256], string[128];
        GetPlayerName(playerid, nick, sizeof(nick));
        format(soubor, sizeof(soubor), Hesla, nick);
        {
        if(!response) return Kick(playerid);
        }
        {
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD), "{73C0E6}Registrace...","{66F2BE}Vítej na serveru XXX! Zde zadej svoje nové heslo:", "{FF80C0}REGISTRACE",);
        }
        TextDrawShowForPlayer(playerid,TDEditor_TD0);
        TextDrawShowForPlayer(playerid,TDEditor_TD1);
        TextDrawShowForPlayer(playerid,TDEditor_TD2);
        DOF2_CreateFile(soubor);
        DOF2_SetInt(soubor, "Heslo", udb_hash(inputtext));
        DOF2_SaveFile();
        format(string, 128, "Byl jsi úspěšně zaregistrovaný na jméno %s. Tvoje heslo je %s.", nick, inputtext);
        SendClientMessage(playerid, 0x66F2BEFF, string);
        StopAudioStreamForPlayer(playerid);
        TextDrawHideForPlayer(playerid,TDEditor_TD0);
        TextDrawHideForPlayer(playerid,TDEditor_TD1);
        TextDrawHideForPlayer(playerid,TDEditor_TD2);
    }
    if (dialogid == 2)
    {
        new nick[MAX_PLAYER_NAME], soubor[256];
        GetPlayerName(playerid, nick, sizeof(nick));
        format(soubor, sizeof(soubor), Hesla, nick);
        if(!response) return Kick(playerid);
        new tmp;
        tmp = DOF2_GetInt(soubor, "Heslo");
        if(udb_hash(inputtext) != tmp)
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD), "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru XXX! Zde zadej svoje heslo:\n{FE635A}Zadal jsi špatné heslo!", "{FF80C0}LOGIN", "");
        TextDrawShowForPlayer(playerid,TDEditor_TD0);
        TextDrawShowForPlayer(playerid,TDEditor_TD1);
        TextDrawShowForPlayer(playerid,TDEditor_TD2);
        if(!strcmp(inputtext,DOF2_GetString(soubor,"Heslo"),false))
        {
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD), "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru XXX! Zde zadej svoje heslo:", "{FF80C0}LOGIN", "");
            TextDrawShowForPlayer(playerid,TDEditor_TD0);
            TextDrawShowForPlayer(playerid,TDEditor_TD1);
            TextDrawShowForPlayer(playerid,TDEditor_TD2);
        }
        else
        {
            SendClientMessage(playerid,0x66F2BEFF, "Byl jsi úspěšně přihlášený!!");
            TextDrawHideForPlayer(playerid,TDEditor_TD0);
            TextDrawHideForPlayer(playerid,TDEditor_TD1);
            TextDrawHideForPlayer(playerid,TDEditor_TD2);
            StopAudioStreamForPlayer(playerid);
        }
    }
    if(dialogid == 3)
    {
    new nick[MAX_PLAYER_NAME], slozka[256];
    GetPlayerName(playerid, nick, sizeof(nick));
    format(slozka, sizeof(slozka), Hesla, nick);
    if(response)
    {
    if(udb_hash(inputtext) != DOF2_GetInt(slozka, "Heslo"))
    {
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT),"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje staré heslo\n{FE635A}Zadal jsi špatné heslo!","{FF80C0}Další","{FE635A}Zavřít");
    }
    else
    {
    ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT),"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje nové heslo","{FF80C0}Hotovo","{FE635A}Zavřít");
    }
    }
    }
    if(dialogid == 4)
    {
    new nick[MAX_PLAYER_NAME], slozka[256];
    GetPlayerName(playerid, nick, sizeof(nick));
    format(slozka, sizeof(slozka), Hesla, nick);
    if(response)
    {
    DOF2_SetInt(slozka, "Heslo", udb_hash(inputtext));
    DOF2_SaveFile();
    SendClientMessage(playerid,0x66F2BEFF,"Heslo bylo úspěšně změněho! Svoje heslo si zapamatuj pro další přihlášení.");
    }
    }
    return 1;
}

 

Sdílet tento příspěvek


Link to post
Share on other sites

10 odpovědí na tuto otázku

Recommended Posts

  • 0
 
Spoiler

 

#pragma tabsize 0
#include <a_samp>
#include <dof2>
#include <dudb>
#define Hesla "/Ucty/Hesla/%s.txt"
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
#pragma unused ret_memcpy

new Text:TDEditor_TD0;
new Text:TDEditor_TD1;
new Text:TDEditor_TD2;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Test Reg/Log system");
    print("--------------------------------------\n");
    TDEditor_TD0 = TextDrawCreate(291.405975, -1.333245, "_");
    TextDrawLetterSize(TDEditor_TD0, 0.384538, 7.911665);
    TextDrawTextSize(TDEditor_TD0, 8.760105, 1072.000000);
    TextDrawAlignment(TDEditor_TD0, 2);
    TextDrawColor(TDEditor_TD0, -1);
    TextDrawUseBox(TDEditor_TD0, 1);
    TextDrawBoxColor(TDEditor_TD0, 255);
    TextDrawSetShadow(TDEditor_TD0, 87);
    TextDrawSetOutline(TDEditor_TD0, 212);
    TextDrawBackgroundColor(TDEditor_TD0, 255);
    TextDrawFont(TDEditor_TD0, 1);
    TextDrawSetProportional(TDEditor_TD0, 0);
    TextDrawSetShadow(TDEditor_TD0, 87);

    TDEditor_TD1 = TextDrawCreate(280.630065, 375.500213, "_");
    TextDrawLetterSize(TDEditor_TD1, 0.384538, 7.911665);
    TextDrawTextSize(TDEditor_TD1, 8.760105, 1072.000000);
    TextDrawAlignment(TDEditor_TD1, 2);
    TextDrawColor(TDEditor_TD1, -1);
    TextDrawUseBox(TDEditor_TD1, 1);
    TextDrawBoxColor(TDEditor_TD1, 255);
    TextDrawSetShadow(TDEditor_TD1, 87);
    TextDrawSetOutline(TDEditor_TD1, 212);
    TextDrawBackgroundColor(TDEditor_TD1, 255);
    TextDrawFont(TDEditor_TD1, 1);
    TextDrawSetProportional(TDEditor_TD1, 0);
    TextDrawSetShadow(TDEditor_TD1, 87);

    TDEditor_TD2 = TextDrawCreate(227.218048, 24.916673, "NAZEV_SERVERU");
    TextDrawLetterSize(TDEditor_TD2, 0.648784, 3.349999);
    TextDrawAlignment(TDEditor_TD2, 1);
    TextDrawColor(TDEditor_TD2, -5963521);
    TextDrawSetShadow(TDEditor_TD2, 0);
    TextDrawSetOutline(TDEditor_TD2, 0);
    TextDrawBackgroundColor(TDEditor_TD2, 255);
    TextDrawFont(TDEditor_TD2, 2);
    TextDrawSetProportional(TDEditor_TD2, 1);
    TextDrawSetShadow(TDEditor_TD2, 0);
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Destinyho gm");
    print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
    SetGameModeText("Ahojda!");
    AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
    return 1;
}

public OnGameModeExit()
{
    DOF2_Exit();
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
    SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
	new nick[MAX_PLAYER_NAME],  soubor[256];
    GetPlayerName(playerid, nick, sizeof(nick));
    format(soubor, sizeof(soubor), Hesla, nick);
    if (DOF2_FileExists(soubor))
    {
    	ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru T&M&A! Zde zadej svoje heslo: ","{FF80C0}Login", "Quit");
    	PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7r8pac2erw/Alesso_vs_OneRepublic_-_If_I_Lose_Myself_Alesso_Remix_.mp3");
    	TextDrawShowForPlayer(playerid,TDEditor_TD0);
   	 	TextDrawShowForPlayer(playerid,TDEditor_TD1);
    	TextDrawShowForPlayer(playerid,TDEditor_TD2);
    }
    else
    {
    	ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{73C0E6}Registrace...","{66F2BE}Vítej na serveru XXX! Zde zadej svoje nové heslo:", "{FF80C0}REGISTRACE", "");
    	PlayAudioStreamForPlayer(playerid, "http://k007.kiwi6.com/hotlink/7r8pac2erw/Alesso_vs_OneRepublic_-_If_I_Lose_Myself_Alesso_Remix_.mp3");
    	TextDrawShowForPlayer(playerid,TDEditor_TD0);
    	TextDrawShowForPlayer(playerid,TDEditor_TD1);
    	TextDrawShowForPlayer(playerid,TDEditor_TD2);
    }
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    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[])
{
    dcmd(changepass,10,cmdtext);
    return 0;
}

dcmd_changepass(playerid,params[])
{
    #pragma unused params
    ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje staré heslo","{FF80C0}Další","{FE635A}Zavřít");
    return 1;
}

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 OnObjectMoved(objectid)
{
    return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
    return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
    return 1;
}

public OnPlayerExitedMenu(playerid)
{
    return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if (dialogid == 1)
    {
        new nick[MAX_PLAYER_NAME], soubor[256], string[128];
        GetPlayerName(playerid, nick, sizeof(nick));
        format(soubor, sizeof(soubor), Hesla, nick);
        if(!response) return Kick(playerid);
        if(!strlen(inputtext)) return ShowPlayerDialog(playerid, 1, DIALOG_STYLE_PASSWORD, "{73C0E6}Registrace...","{66F2BE}Vítej na serveru XXX! Zde zadej svoje nové heslo:", "{FF80C0}REGISTRACE","");
        TextDrawShowForPlayer(playerid,TDEditor_TD0);
        TextDrawShowForPlayer(playerid,TDEditor_TD1);
        TextDrawShowForPlayer(playerid,TDEditor_TD2);
        DOF2_CreateFile(soubor);
        DOF2_SetInt(soubor, "Heslo", udb_hash(inputtext));
        DOF2_SaveFile();
        format(string, 128, "Byl jsi úspěšně zaregistrovaný na jméno %s. Tvoje heslo je %s.", nick, inputtext);
        SendClientMessage(playerid, 0x66F2BEFF, string);
        StopAudioStreamForPlayer(playerid);
        TextDrawHideForPlayer(playerid,TDEditor_TD0);
        TextDrawHideForPlayer(playerid,TDEditor_TD1);
        TextDrawHideForPlayer(playerid,TDEditor_TD2);
    }
    if (dialogid == 2)
    {
        new nick[MAX_PLAYER_NAME], soubor[256];
        GetPlayerName(playerid, nick, sizeof(nick));
        format(soubor, sizeof(soubor), Hesla, nick);
        if(!response) return Kick(playerid);
        new tmp;
        tmp = DOF2_GetInt(soubor, "Heslo");
        if(udb_hash(inputtext) != tmp)
        ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru XXX! Zde zadej svoje heslo:\n{FE635A}Zadal jsi špatné heslo!", "{FF80C0}LOGIN", "");
        TextDrawShowForPlayer(playerid,TDEditor_TD0);
        TextDrawShowForPlayer(playerid,TDEditor_TD1);
        TextDrawShowForPlayer(playerid,TDEditor_TD2);
        if(!strcmp(inputtext,DOF2_GetString(soubor,"Heslo"),false))
        {
            ShowPlayerDialog(playerid, 2, DIALOG_STYLE_PASSWORD, "{73C0E6}Přihlašování...", "{66F2BE}Vítej zpátky na serveru XXX! Zde zadej svoje heslo:", "{FF80C0}LOGIN", "");
            TextDrawShowForPlayer(playerid,TDEditor_TD0);
            TextDrawShowForPlayer(playerid,TDEditor_TD1);
            TextDrawShowForPlayer(playerid,TDEditor_TD2);
        }
        else
        {
            SendClientMessage(playerid,0x66F2BEFF, "Byl jsi úspěšně přihlášený!!");
            TextDrawHideForPlayer(playerid,TDEditor_TD0);
            TextDrawHideForPlayer(playerid,TDEditor_TD1);
            TextDrawHideForPlayer(playerid,TDEditor_TD2);
            StopAudioStreamForPlayer(playerid);
        }
    }
    if(dialogid == 3)
    {
    	new nick[MAX_PLAYER_NAME], slozka[256];
    	GetPlayerName(playerid, nick, sizeof(nick));
    	format(slozka, sizeof(slozka), Hesla, nick);
    	if(response)
    	{
    		if(udb_hash(inputtext) != DOF2_GetInt(slozka, "Heslo"))
    		{
    			ShowPlayerDialog(playerid,3,DIALOG_STYLE_INPUT,"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje staré heslo\n{FE635A}Zadal jsi špatné heslo!","{FF80C0}Další","{FE635A}Zavřít");
    		}
    		else
    		{
    			ShowPlayerDialog(playerid,4,DIALOG_STYLE_INPUT,"{73C0E6}Změna hesla","{66F2BE}Zadej prosím svoje nové heslo","{FF80C0}Hotovo","{FE635A}Zavřít");
    		}
    	}
    }
    if(dialogid == 4)
    {
    	new nick[MAX_PLAYER_NAME], slozka[256];
    	GetPlayerName(playerid, nick, sizeof(nick));
    	format(slozka, sizeof(slozka), Hesla, nick);
    	if(response)
    	{
    		DOF2_SetInt(slozka, "Heslo", udb_hash(inputtext));
    		DOF2_SaveFile();
    		SendClientMessage(playerid,0x66F2BEFF,"Heslo bylo úspěšně změněho! Svoje heslo si zapamatuj pro další přihlášení.");
    	}
    }
    return 1;
}

Máš to... a keby boli problemy napíš

 

 

Edited by Lucifer Morningstar
Spoiler

Sdílet tento příspěvek


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×
×
  • Create New...