Jump to content

[REZOLVAT] Problema text


tranquilla234
 Share

Recommended Posts

incearca sa pui textu din baza de date, poate e o problema la comanda cu care setezi motd-ul

modifica in db si da un restart apoi vezi. daca e din cauza comenzii, lasa comanda aici (pastebin)

Link to comment
Share on other sites

4 hours ago, Wildo said:

incearca sa pui textu din baza de date, poate e o problema la comanda cu care setezi motd-ul

modifica in db si da un restart apoi vezi. daca e din cauza comenzii, lasa comanda aici (pastebin)

 

CMD:gmotd(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return Error(playerid, "Trebuie sa te loghezi mai intai.");
    if(PlayerInfo[playerid][pMember] == 0) return Error(playerid,"Nu esti in nicio factiune .");
    if(PlayerInfo[playerid][pRank] < 6) return Error(playerid, "Nu ai rank 6+.");
    new newsf[128],string[256],name[30];
    if(sscanf(params, "s[128]",newsf)) return Usage(playerid, "/gmotd <Message>");
    if(FindIP(newsf)) /// Anti-Reclama
    {
        new advertiser[MAX_PLAYER_NAME];
        GetPlayerName(playerid, advertiser, sizeof(advertiser));
        format(string, sizeof(string), "{C40808}(Chat Bot){FFFFFF} %s(/id %d) typed ''%s'' in /gmotd.", advertiser, playerid, newsf);
        ABroadCast(COLOR_WHITE,string,1);
    }
    GetPlayerName(playerid, name, sizeof(name));
    strmid(DynamicFactions[PlayerInfo[playerid][pMember]][fAnn], newsf, 0, strlen(newsf), 255);
    SCMf(playerid,COLOR_WHITE,"* Ai schimbat MOTD-ul factiunii in %s.",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
    SendClientMessage(playerid, COLOR_WHITE, "{58FAAC}Foloseste MOTD-ul doar pentru anunturi importante. Folosirea /gmotd pentru glume, spam va fi sanctionata.");
    format(string,sizeof(string),"* %s a schimbat MOTD-ul factiunii in '%s'.",name,DynamicFactions[PlayerInfo[playerid][pMember]][fAnn]);
    SendFamilyMessage(PlayerInfo[playerid][pMember],COLOR_GENANNOUNCE,string);
    mysql_format(SQL,string, sizeof(string), "UPDATE `factions` SET `Anunt`='%s' WHERE `ID`='%d' LIMIT 1",DynamicFactions[PlayerInfo[playerid][pMember]][fAnn], PlayerInfo[playerid][pMember]);
    mysql_tquery(SQL,string,"","");
    return 1;
}

Cand intru pe sv imi arata motd-ul si am tot la fel cu  DynamicFactions[1][fAnn]. O fi o problema ca am pus in ongamemodeinit si sa nu-l citeasca?

Link to comment
Share on other sites

incearca sa pui functia aia ce afiseaza label-ul undeva la timere  sa vezi daca nu-l afiseaza asa, respectiv functia de updatare a label-ului la comanda /gmotd mai in jos de liniile de salvare in sql a motd-ului

 

nu prea am idee cum sta treaba cu label-urile ca inafara de niste label-uri globale nu ma folosesc la altceva de ele ca mi se par inutile.

Edited by Wildo
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...