Jump to content

Question

Posted (edited)

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.

3 answers to this question

Recommended Posts

  • 0
Posted

Spatii intre tag-ul clanului si nume, doar cand creezi clan-ul si dupa ce scri cat-ul dorit si dai un space dupa text nu mai merge tag-ul la clan.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • 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.