Jump to content
Autentificarea cu Google și Facebook nu mai este disponibilă. ×

Recommended Posts

Posted

Tin sa mentionez ca acest server la coamnda /factions unde apar lideri aparea si statusul pentru aplicatie daca se poate aplica closed sau open si o pot modifica doar din mysql nu am comanda am incercat sa fac unu sa modific din joc dar nu reusesc ce am gresit 

 

CMD:status(playerid, params [])
{
    if(pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 13) return SendClientMessage(playerid, COLOR_DARKGRAY, "You not have minimum rank 6.");
    new motd[90];
    if(sscanf(params, "s[90]", motd)) return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/status [MOTD Text]");
    if(strlen(motd) > 89) return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum characters allowed for status is 90.");
    if(!IsValidMOTD(motd)) return SendClientMessage(playerid, COLOR_DARKGRAY, "Invalid characters, valid characters are: A-Z, a-z, 0-9, (. , : ! ?).");
    mysql_tquery(MySQLCon, "SELECT option_value FROM `inf_options` WHERE `option_name`='factionAppStatus1' OR `option_name`='factionAppStatus2' OR `option_name`='factionAppStatus3' OR `option_name`='factionAppStatus4'OR `option_name`='factionAppStatus5'OR `option_name`='factionAppStatus6'OR `option_name`='factionAppStatus7'OR `option_name`='factionAppStatus8'OR `option_name`='factionAppStatus9'OR `option_name`='factionAppStatus10'OR `option_name`='factionAppStatus11'OR `option_name`='factionAppStatus12'OR `option_name`='factionAppStatus14'OR `option_name`='factionAppStatus15'OR `option_name`='factionAppStatus16'OR `option_name`='factionAppStatus17'OR `option_name`='factionAppStatus18'OR `option_name`='factionAppStatus19'", "OnFUP", "");
    format(stringf[pInfo[playerid][pMember]-1], 100, "Faction MOTD: {FFFFFF}%s", motd), SendClientMessage(playerid, 0xA9C4E4FF, stringf[pInfo[playerid][pMember]-1]);
    return 1;
}

daca scriam 0 trebuia sa se modifice in baza de date si sa nu mai poti aplica si daca pui 1 sa poti aplica!

 

Discord: BaDB0y#3017

  • 2 weeks later...
  • 2 years later...
Posted

CMD:status(playerid, params[])

{

    if (pInfo[playerid][pRank] < 6 || pInfo[playerid][pMember] == 13)

    {

        return SendClientMessage(playerid, COLOR_DARKGRAY, "You do not have the minimum rank of 6.");

    }

 

    new motd[90];

 

    if (sscanf(params, "s[90]", motd))

    {

        return SendClientMessage(playerid, 0x8EC7DCFF, "Syntax: {FFFFFF}/status [MOTD Text]");

    }

 

    if (strlen(motd) > 90)

    {

        return SendClientMessage(playerid, COLOR_DARKGRAY, "Maximum characters allowed for status is 90.");

    }

 

    if (!IsValidMOTD(motd))

    {

        return SendClientMessage(playerid, COLOR_DARKGRAY, "Invalid characters, valid characters are: A-Z, a-z, 0-9, (. , : ! ?).");

    }

 

    new query[200];

    mysql_format(query, sizeof(query), "UPDATE inf_options SET option_value = '%s' WHERE option_name = 'factionAppStatus%d'",

                 motd, pInfo[playerid][pMember]);

    mysql_tquery(MySQLCon, query, "OnFUP", "");

 

    format(stringf[pInfo[playerid][pMember] - 1], 100, "Faction MOTD: {FFFFFF}%s", motd);

    SendClientMessage(playerid, 0xA9C4E4FF, stringf[pInfo[playerid][pMember] - 1]);

 

    return 1;

}

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.