Jump to content

help


NoName145

Recommended Posts

case DIALOG_REGISTER5: {
            if(!response) return PlayerHasRegistered(playerid);
            new szQuery[256], id = strval(inputtext), Cache: result;
            /*if(id == PlayerInfo[playerid][pSQLID]) {
                SCM(playerid, -1, "Nu iti poti pune ID-ul tau de referral!");
                format(string, sizeof(string), "{C1BDF7}>> {FFFFFF}Ai fost de cineva adus pe comunitatea noastra?\n{C1BDF7}>> {FFFFFF}Daca da scrie-i referalu mai jos.");
                ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "{C1BDF7}Register", string, "{C1BDF7}Next", "{C1BDF7}Cancel");    
                return 1;
            }*/
            new rows;
            format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `ID`='%d' LIMIT 1", id);
            result = mysql_query(database, szQuery);
            new test = cache_get_row_count(rows);
            cache_delete(result);
            if(test != 0) {
                new szResult[250], name[100];
                format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `ID`='%d'", id);
                result = mysql_query(database, szQuery);
                cache_get_field_name(0, "Name", szResult[100]); format(name, 100, szResult[100]);
                cache_delete(result);
                SetPVarInt(playerid, "Referal", id);
                format(string, sizeof(string), "{5F9CC9}>> {FFFFFF}Esti sigur ca {5F9CC9}%s {FFFFFF}te-a adus pe comunitate?", name);
                   ShowPlayerDialog(playerid, DIALOG_REGISTER6, DIALOG_STYLE_MSGBOX, "Referral:", string, "Ok", "Back");
            }
        }

Dialogul imi apare, dar nu mi scrie numele jucatorului pe care il introduc in dialog ca si referal.

Link to comment
Share on other sites

salut, incearca asa:

case DIALOG_REGISTER5: 
{
    if(!response) return PlayerHasRegistered(playerid);
    new id = strval(inputtext);

    /*if(id == PlayerInfo[playerid][pSQLID]) {
        SCM(playerid, -1, "Nu iti poti pune ID-ul tau de referral!");
        format(string, sizeof(string), "{C1BDF7}>> {FFFFFF}Ai fost de cineva adus pe comunitatea noastra?\n{C1BDF7}>> {FFFFFF}Daca da scrie-i referalu mai jos.");
        ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "{C1BDF7}Register", string, "{C1BDF7}Next", "{C1BDF7}Cancel");    
        return 1;
    }*/

    new query[64];
    mysql_format(database, query, sizeof(szQuery), "SELECT * FROM `users` WHERE `ID` = '%d'", id);
    result = mysql_query(database, szQuery);

    if(cache_num_rows())
    {
        new name[MAX_PLAYER_NAME];
        cache_get_field_content(0, "Name", name);

        format(string, sizeof(string), "{5F9CC9}>> {FFFFFF}Esti sigur ca {5F9CC9}%s {FFFFFF}te-a adus pe comunitate?", name);
        ShowPlayerDialog(playerid, DIALOG_REGISTER6, DIALOG_STYLE_MSGBOX, "Referral:", string, "Ok", "Back");
    }

    cache_delete(result);
}

 

  • Thanks 1
Link to comment
Share on other sites

4 hours ago, irinelbro69 said:

salut, incearca asa:

case DIALOG_REGISTER5: 
{
    if(!response) return PlayerHasRegistered(playerid);
    new id = strval(inputtext);

    /*if(id == PlayerInfo[playerid][pSQLID]) {
        SCM(playerid, -1, "Nu iti poti pune ID-ul tau de referral!");
        format(string, sizeof(string), "{C1BDF7}>> {FFFFFF}Ai fost de cineva adus pe comunitatea noastra?\n{C1BDF7}>> {FFFFFF}Daca da scrie-i referalu mai jos.");
        ShowPlayerDialog(playerid, DIALOG_REGISTER5, DIALOG_STYLE_INPUT, "{C1BDF7}Register", string, "{C1BDF7}Next", "{C1BDF7}Cancel");    
        return 1;
    }*/

    new query[64];
    mysql_format(database, query, sizeof(szQuery), "SELECT * FROM `users` WHERE `ID` = '%d'", id);
    result = mysql_query(database, szQuery);

    if(cache_num_rows())
    {
        new name[MAX_PLAYER_NAME];
        cache_get_field_content(0, "Name", name);

        format(string, sizeof(string), "{5F9CC9}>> {FFFFFF}Esti sigur ca {5F9CC9}%s {FFFFFF}te-a adus pe comunitate?", name);
        ShowPlayerDialog(playerid, DIALOG_REGISTER6, DIALOG_STYLE_MSGBOX, "Referral:", string, "Ok", "Back");
    }

    cache_delete(result);
}

 

error 017: undefined symbol "cache_get_field_content" 

Folosesc mysql r41-4

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.