Jump to content
  • 0

Problema Clan Tag


Style.

Question

Salutare, intampin o problema la crearea clan-ului, dupa ce am scris numele clan-ului si cand trebuie sa scriu clan tag-ul spre exemplu [EXE]Exemplu si scriu in dialog-ul acela [EXE] cu spatiu nu il mai seteaza la nume pentru ca nu este,  [EXE]Exemplu ci [EXE] Exemplu cu spatiu..

if(dialogid == DIALOG_CHOOSECLANTAG)
    {
        if(response)
        {
            new other[128];
            if(strlen(inputtext) >= 2 && strlen(inputtext) <= 15)
            {
                new clanname[25],strings[256];
                mysql_real_escape_string(inputtext, clanname);
                strcpy(ClanInfo[PlayerInfo[playerid][pClan]][cClanTag], clanname, sizeof(clanname));
                mysql_format(SQL, strings, sizeof(strings), "UPDATE clans SET `clanTag`='%s' WHERE `clanID`='%d'", clanname, PlayerInfo[playerid][pClan]);
                mysql_tquery(SQL,strings,"","");
                format(strings, sizeof(strings), "Clan tag: %s.", clanname);
                SendClientMessage(playerid, COLOR_GENANNOUNCE, strings);
                mysql_format(SQL, strings, sizeof(strings), "SELECT * FROM `clans`");
                mysql_tquery(SQL, strings, "LoadClanInfo", "");
            }
            else
            {
                ShowPlayerDialog(playerid, DIALOG_CHOOSECLANTAG, DIALOG_STYLE_INPUT, "Clan tag", "Insert clan tag in the box below:\nMinimum 2 characters and maximum 15     characters.\n(You can't change it after that!)", "Ok", "");
                return 1;
            }
        }
    }

Am incercat ceva dar tot nu functioneaza,

for(new i; i < strlen(inputtext); i++){	if(strfind(inputtext[i]," ", true) == 0)	{		inputtext[i] = '';	}}
	

Edited by Style.
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Join the conversation

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

Guest
Answer this question...

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