Jump to content

GeOrGe.XD

Membru
  • Posts

    30
  • Joined

  • Last visited

Posts posted by GeOrGe.XD

  1. Acum 16 minute, Maurice a spus:

    Modifica in baza de date campul "Pin" din varchar in int

    Acelasi text in game apare...

    Eu zic ca de la asta este devine

    if(!strcmp(pin, PlayerData[playerid][pPin], true)) {

    dar daca pun if(strcmp, pin, bla bla) imi ia orice pin

  2. Acum 49 minute, Maurice a spus:

     

    
    format(string, sizeof(string), "Pinul tau este: %d",PlayerInfo[playerid][pPin]);
    SendClientMessage(playerid, COLOR_SERVER, string);

     Pune asta dupa SetPlayerScore si inainte de return 1 si spune-mi in joc ce iti arata

    arata pinul ca in baza de date

    In baza de date coloana este facuta astfel: `Pin` varchar(4) NOT NULL,

    Imi arata pinul ca in baza de date, am facut o chiestie: mi am setat pin 0 si am dat pe svr addpin dupa am dat pin, imi zice ca codul este bun si dupa relog codul zice ca este gresit

  3. CMD:pin(playerid, params[])
    {
    	new pin[128];
    	if(PlayerData[playerid][pUnlocked] != 0) return SCM(playerid, COLOR_YELLOW, "Contul tau este deja deblocat.");
    	if(sscanf(params, "s[128]", pin)) return SCM(playerid, COLOR_SERVER, "Sintaxa: /addpin <4-numere>");
    	if(strlen(pin) != 4) return SCM(playerid, COLOR_SERVER, "Sintaxa: /pin <4-numere>");
    	if(!IsNumeric(pin)) return SCM(playerid, COLOR_SERVER, "Sintaxa: /pin <4-numere>");
    	if(!strcmp(pin, PlayerData[playerid][pPin], true)) {
    		PlayerData[playerid][pUnlocked] = 1;
    		SCM(playerid, COLOR_YELLOW, "Contul tau a fost deblocat cu succes!");
    	} else {
    		SCM(playerid, COLOR_YELLOW, "Ai introdus un PIN gresit!");
    	}
    	return 1;
    }

     

  4. Acum 5 minute, Maurice a spus:

    .........................

    Pune-l in functia PlayerLogin si posteaz-o. Zi-mi ce afiseaza

    public PlayerLoginDone(playerid)
    {
    	print(PlayerData[playerid][pPin]);
        cache_get_value_name_int(0, "ID", PlayerData[playerid][pID]);
        cache_get_value_name(0, "Name", PlayerData[playerid][pName]);
        cache_get_value_name(0, "Password", PlayerData[playerid][pPassword]);
        cache_get_value_name_int(0, "IP", PlayerData[playerid][pIP]);
        cache_get_value_name(0, "Email", PlayerData[playerid][pEmail]);
        cache_get_value_name_int(0, "Gender", PlayerData[playerid][pGender]);
        cache_get_value_name_int(0, "Age", PlayerData[playerid][pAge]);
        cache_get_value_name_int(0, "RegisterStep", PlayerData[playerid][pRegisterStep]);
        cache_get_value_name_int(0, "Admin", PlayerData[playerid][pAdmin]);
        cache_get_value_name_int(0, "Helper", PlayerData[playerid][pHelper]);
        cache_get_value_name_int(0, "Winner", PlayerData[playerid][pWinner]);
        cache_get_value_name_int(0, "Skin", PlayerData[playerid][pSkin]);
        cache_get_value_name_int(0, "DriversLic", PlayerData[playerid][pDriversLic]);
        cache_get_value_name_int(0, "Money", PlayerData[playerid][pMoney]);
        cache_get_value_name_int(0, "Level", PlayerData[playerid][pLevel]);
        cache_get_value_name_int(0, "Pin", PlayerData[playerid][pPin]);
        cache_get_value_name_int(0, "PinSet", PlayerData[playerid][pPinSet]);
    
        if(PlayerData[playerid][pRegisterStep] < 3)
        {
            SetPlayerPos(playerid, 1744.4095, -1809.4142, 54.5687);
            SetPlayerCameraPos(playerid, 1775.1698, -1847.5277, 43.9137);
            SetPlayerCameraLookAt(playerid, 1800.4873, -1867.0626, 13.5706);
    
            switch(PlayerData[playerid][pRegisterStep])
            {
                case 0: return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}E-mail:", "{FFFFFF}Introdu adresa de mail mai jos.\n\nExemplu:[email protected]:", "Ok", "");
                case 1: return ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "{FFFFFF}Sexul:", "{FFFFFF}Selecteaza-ti ce sex sa aiba caracterul tau:", "Barbat", "Femeie");
                case 2: return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{FFFFFF}Varsta:", "{FFFFFF}Introdu varsta ta:", "Ok", "");
            }
    
            return 1;
        }
    
        SetSpawnInfo(playerid, 0, PlayerData[playerid][pSkin], 1800.1581, -1865.7731, 13.5722, 0, 0, 0, 0, 0, 0, 0), SpawnPlayer(playerid);
    
       	if(PlayerData[playerid][pAdmin] > 0)
    	{
    		format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu admin nivel %d.",PlayerData[playerid][pAdmin]);
    		SendClientMessage(playerid, COLOR_SERVER,gString);
    	}
    	
    	if(PlayerData[playerid][pHelper] > 0)
    	{
    		format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu helper nivel %d.",PlayerData[playerid][pHelper]);
    		SendClientMessage(playerid, COLOR_SERVER,gString);
    	}
    	
        if(PlayerData[playerid][pWinner] == 1) SendClientMessage(playerid, COLOR_WHITE, "Your account is upgraded to Winner. ;)");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Anticheat-ul s-a activat cu succes pe contul tau.");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Forumul nostru este: http://www.forum.localhost.ro");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Panelul nostru este: http://www.panel.localhost.ro");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Shopul nostru este: http://www.shop.localhost.ro");
       	if(PlayerData[playerid][pPinSet] == 1) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Pentru a beneficia de bunurile de pe contul tau foloseste comanda {FFFF4A}[/pin]");
    	if(PlayerData[playerid][pPinSet] == 0) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Nu ai un pin setat. Pentru a-ti seta pinul foloseste comanda {FFFF4A}[/addpin]");
    
        GetPlayerMoney(playerid);
        GivePlayerMoney(playerid, PlayerData[playerid][pMoney]);
        SetPlayerScore(playerid, PlayerData[playerid][pLevel]);
        return 1;
    }

    La fel "Pin gresit" si in consola nmk

  5. Acum 21 ore, Maurice a spus:

    Incearca

    
    cache_get_value_name_int(0, "Pin", PlayerData[playerid][pPin]); 

     

     

    	if(!strcmp(pin, PlayerData[playerid][pPin], true)) {
    		PlayerData[playerid][pUnlocked] = 1;
    		SCM(playerid, COLOR_YELLOW, "Contul tau a fost deblocat cu succes!");
    	} else {
    		SCM(playerid, COLOR_YELLOW, "Ai introdus un PIN gresit!");
    	}

    Se pare ca este de la acel !strcmp, daca il las fara semnul exclamarii ia orice pin.

  6. public PlayerLoginDone(playerid)
    {
        cache_get_value_name_int(0, "ID", PlayerData[playerid][pID]);
        cache_get_value_name(0, "Name", PlayerData[playerid][pName]);
        cache_get_value_name(0, "Password", PlayerData[playerid][pPassword]);
        cache_get_value_name_int(0, "IP", PlayerData[playerid][pIP]);
        cache_get_value_name(0, "Email", PlayerData[playerid][pEmail]);
        cache_get_value_name_int(0, "Gender", PlayerData[playerid][pGender]);
        cache_get_value_name_int(0, "Age", PlayerData[playerid][pAge]);
        cache_get_value_name_int(0, "RegisterStep", PlayerData[playerid][pRegisterStep]);
        cache_get_value_name_int(0, "Admin", PlayerData[playerid][pAdmin]);
        cache_get_value_name_int(0, "Helper", PlayerData[playerid][pHelper]);
        cache_get_value_name_int(0, "Winner", PlayerData[playerid][pWinner]);
        cache_get_value_name_int(0, "Skin", PlayerData[playerid][pSkin]);
        cache_get_value_name_int(0, "DriversLic", PlayerData[playerid][pDriversLic]);
        cache_get_value_name_int(0, "Money", PlayerData[playerid][pMoney]);
        cache_get_value_name_int(0, "Level", PlayerData[playerid][pLevel]);
     	cache_get_value_name(1, "Pin", PlayerData[playerid][pPin]);
        cache_get_value_name_int(0, "PinSet", PlayerData[playerid][pPinSet]);
       /* new result;
        cache_get_row_count(result,"Pin"); format(PlayerData[playerid][pPin], 5, "%s", result);*/
    
        if(PlayerData[playerid][pRegisterStep] < 3)
        {
            SetPlayerPos(playerid, 1744.4095, -1809.4142, 54.5687);
            SetPlayerCameraPos(playerid, 1775.1698, -1847.5277, 43.9137);
            SetPlayerCameraLookAt(playerid, 1800.4873, -1867.0626, 13.5706);
    
            switch(PlayerData[playerid][pRegisterStep])
            {
                case 0: return ShowPlayerDialog(playerid, DIALOG_EMAIL, DIALOG_STYLE_INPUT, "{FFFFFF}E-mail:", "{FFFFFF}Introdu adresa de mail mai jos.\n\nExemplu:[email protected]:", "Ok", "");
                case 1: return ShowPlayerDialog(playerid, DIALOG_GENDER, DIALOG_STYLE_MSGBOX, "{FFFFFF}Sexul:", "{FFFFFF}Selecteaza-ti ce sex sa aiba caracterul tau:", "Barbat", "Femeie");
                case 2: return ShowPlayerDialog(playerid, DIALOG_AGE, DIALOG_STYLE_INPUT, "{FFFFFF}Varsta:", "{FFFFFF}Introdu varsta ta:", "Ok", "");
            }
    
            return 1;
        }
    
        SetSpawnInfo(playerid, 0, PlayerData[playerid][pSkin], 1800.1581, -1865.7731, 13.5722, 0, 0, 0, 0, 0, 0, 0), SpawnPlayer(playerid);
    
       	if(PlayerData[playerid][pAdmin] > 0)
    	{
    		format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu admin nivel %d.",PlayerData[playerid][pAdmin]);
    		SendClientMessage(playerid, COLOR_SERVER,gString);
    	}
    	
    	if(PlayerData[playerid][pHelper] > 0)
    	{
    		format(gString, sizeof(gString), "SERVER:{FFFFFF} Te-ai logat cu helper nivel %d.",PlayerData[playerid][pHelper]);
    		SendClientMessage(playerid, COLOR_SERVER,gString);
    	}
    	
        if(PlayerData[playerid][pWinner] == 1) SendClientMessage(playerid, COLOR_WHITE, "Your account is upgraded to Winner. ;)");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Anticheat-ul s-a activat cu succes pe contul tau.");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Forumul nostru este: http://www.forum.localhost.ro");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Panelul nostru este: http://www.panel.localhost.ro");
        SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Shopul nostru este: http://www.shop.localhost.ro");
       	if(PlayerData[playerid][pPinSet] == 1) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Pentru a beneficia de bunurile de pe contul tau foloseste comanda {FFFF4A}[/pin]");
    	if(PlayerData[playerid][pPinSet] == 0) SendClientMessage(playerid, COLOR_SERVER, "SERVER:{FFFFFF} Nu ai un pin setat. Pentru a-ti seta pinul foloseste comanda {FFFF4A}[/addpin]");
    
        GetPlayerMoney(playerid);
        GivePlayerMoney(playerid, PlayerData[playerid][pMoney]);
        SetPlayerScore(playerid, PlayerData[playerid][pLevel]);
        return 1;
    }

    Iti mai arat si restul?

    Acum 2 minute, WopsS a spus:

    Ai verificat mysql.log sa vezi ce erori ai in joc? Si arata-ne sistemul de autentificare sau inregistrare pe care il ai.

     

  7. Am facut sistem de pin pe versiunea de MySQL r40 (ultima)

    si am probleme:

    Cand intru in joc zice pin gresit, daca am linia de forma asta

    cache_get_value_name(0, "Pin", PlayerData[playerid][pPin]); 

    Daca o am de forma:

    cache_get_value_name_int(1, "Pin", PlayerData[playerid][pPin]);

    imi ia orice pin, imi poti explica ce trebuie sa fac, in acest caz?

  8. Am facut un sistem de pin, la server foloses R41(ultima versiune pt mysql)

    Si ma bate o chiestie, cand dau pin <codul> imi zice pin incorect, am incercat sa folosesc (mysql_fetch_field_row(result,"Pin"); format(PlayerInfo[playerid][pPin], 5, "%s", result);) dar da eroare la compilare, ce pot face ca sa mearga

     

    Nu mi dau seama ce ar trebuii sa schimb la result si format,ca mysql_fetch_Field_row il modific in cache_get_value_name_int

     

  9. 10 hours ago, WopsS said:

    La functia LoadBizz accesezi pozitia 9, dar tu ai de la 0 pana la 9.

    ok, ms

    Si mai am o problema, la gm saints am dat wipe dupa ce l am modificat (total, aproape) am reusit sa ma inregistrez eu, dar cand cineva vrea sa se inregistreze, nu poate, sti ce are?

  10. [21:22:13] [debug] Run time error 4: "Array index out of bounds"
    [21:22:13] [debug]  Accessing element at index 9 past array upper bound 8
    [21:22:13] [debug] AMX backtrace:
    [21:22:13] [debug] #0 0007d000 in public LoadBizz () from ro-rpg.amx
    [21:22:13] [debug] #1 0008ac5c in public L_AFK_OnGM () from ro-rpg.amx
    [21:22:13] [debug] #2 native CallLocalFunction () from samp-server.exe
    [21:22:13] [debug] #3 00007ba4 in public zcmd_OnGameModeInit () from ro-rpg.amx
    [21:22:13] [debug] #4 native CallLocalFunction () from samp-server.exe
    [21:22:13] [debug] #5 000076ec in public SSCANF_OnGameModeInit () from ro-rpg.amx
    [21:22:13] [debug] #6 00001a54 in public Itter_OnGameModeInit () from ro-rpg.amx
    [21:22:13] [debug] #7 native CallLocalFunction () from samp-server.exe
    [21:22:13] [debug] #8 00001130 in public PZone_OnGameModeInit () from ro-rpg.amx
    [21:22:13] [debug] #9 native CallLocalFunction () from samp-server.exe
    [21:22:13] [debug] #10 00000be4 in public OnGameModeInit () from ro-rpg.amx

  11. 18 minutes ago, Banditul said:

    Ori pui 

    
    SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo)
    SpawnPlayer(playerid);

    Si scapi de class selection dupa login

    Sau folosesti 

    
    TogglePlayerSpectating(playerid, 1);

    Altfel nu ai cum sa scapi de el...

    Note: Nu mai poti folosi class selection, adica sa selectezi skinul de acolo daca folosesti una din cele 2 metode de mai sus

    la onplayerlogin le pun, nu?

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.