Jump to content
  • 0

Salut, vreau sa pun comanda [/e] din gm bigzone in gm Burned


Question

Posted

Salut, vreau sa pun comanda [/e] (chat-ul helperilor) din gm-ul bigzone in gm-ul burned dar primesc aceste erori.. cine vrea sa ma ajute cu comanda uitati-o aici v-as fi recunoscator, multumesc: 

Comanda: CMD:e(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0)
        {
            if(toge[playerid] == 1) return SendClientMessage(playerid, COLOR_WHITE, "You have disabled helper chat, use /toge to enable.");
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /e [message]");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                 format(string, sizeof(string), "(%d) Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
            }
            else if(PlayerInfo[playerid][pHelper] >= 1)
            {
                format(string, sizeof(string), "(%d) Helper %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
            }
            foreach(new i : Player)
            {
                if(PlayerInfo[pAdmin] > 0 || PlayerInfo[pHelper] > 0)
                {
                    if(toge == 0) SendSplitMessage(i, COLOR_ADMIN, string);
                }
            }
            new var100[300],resulttt[300];
            mysql_real_escape_string(string, resulttt);
            mysql_format(SQL,var100, sizeof(var100), "INSERT INTO chat_logs (`playerid`,`text`,`where`) VALUES ('%d','%s','e')", PlayerInfo[playerid][pSQLID], resulttt);
            mysql_tquery(SQL,var100,"","");
        }
        else return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly);
    }
    return 1;
}wta2pie.png 

2 answers to this question

Recommended Posts

  • 0
Posted
1 oră în urmă, Caen a spus:

Salut, vreau sa pun comanda [/e] (chat-ul helperilor) din gm-ul bigzone in gm-ul burned dar primesc aceste erori.. cine vrea sa ma ajute cu comanda uitati-o aici v-as fi recunoscator, multumesc: 

Comanda: CMD:e(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to log in first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pHelper] > 0)
        {
            if(toge[playerid] == 1) return SendClientMessage(playerid, COLOR_WHITE, "You have disabled helper chat, use /toge to enable.");
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_GREY, "Syntax:{FFFFFF} /e [message]");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] >= 1)
            {
                 format(string, sizeof(string), "(%d) Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
            }
            else if(PlayerInfo[playerid][pHelper] >= 1)
            {
                format(string, sizeof(string), "(%d) Helper %s: %s", PlayerInfo[playerid][pHelper], sendername, result);
            }
            foreach(new i : Player)
            {
                if(PlayerInfo[pAdmin] > 0 || PlayerInfo[pHelper] > 0)
                {
                    if(toge == 0) SendSplitMessage(i, COLOR_ADMIN, string);
                }
            }
            new var100[300],resulttt[300];
            mysql_real_escape_string(string, resulttt);
            mysql_format(SQL,var100, sizeof(var100), "INSERT INTO chat_logs (`playerid`,`text`,`where`) VALUES ('%d','%s','e')", PlayerInfo[playerid][pSQLID], resulttt);
            mysql_tquery(SQL,var100,"","");
        }
        else return SendClientMessage(playerid, COLOR_LIGHTGREEN3, AdminOnly);
    }
    return 1;
}wta2pie.png 

Daca nu vrei sa implementezi si /tog pt chatul helperilor poti sterge verificarea dupa linia cu pricina.

Daca vrei sa adauci si partea de tog adaugi variabila cum a zis si andy47 plus codul pt comanda /tog

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.