Jump to content
  • 0

Ajutor GM


PinDer

Question

 

Descrierea problemei:Deci am si eu o problema,mai exact cind scriu pe /a (Admin Chat ) sau pe /ha (Helper Chat) se scrie de doua ori chiar daca eu scriu doar o data...
Liniile de cod / sursa / script-ul(obligatoriu): http://imgur.com/a/sdhJC
Imagini / Video (optional):  http://imgur.com/a/sdhJC
Alte detalii:Va Rog Ajutatima!!!

Edited by PinDer
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0

Ok si de ce ne dai poza cu jocul cand scrii comanda? Ca banuiam si noi ca iti scrie de 2 ori pe joc ca doar ne ai zis. Arata conanda din gm ca sa te ajutam

 

    __  ____      __           
   /  |/  (_)____/ /____  _____
  / /|_/ / / ___/ __/ _ \/ ___/
 / /  / / (__  ) /_/  __/ /    
/_/  /_/_/____/\__/\___/_/     
SERVICII SCRIPTING DE CALITATE
Pagina     Scripting     pawn
Link to comment
Share on other sites

  • 0

CMD:a(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if (PlayerInfo[playerid][pAdmin] > 0)
        {
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/a <Message>");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] > 0)
            {
                format(string, sizeof(string), "(%d) Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);
            }
            ABroadCast(COLOR_ADMCHAT, string,1);
        }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}

Link to comment
Share on other sites

  • 0

Nu sunt sigur ca asta este ceea ce ai nevoie dar..


public ABroadCast(color,const string[],level)
{
    foreach(Player, i)
    {
        if(IsPlayerConnected(i))
        {
            if(gPlayerLogged == 1)
            {
                if (PlayerInfo[pAdmin] >= level)
                {
                    SendClientMessage(i, color, string);
                }
            }
        }
    }
    printf("%s", string);
    return 1;
}
 

Edited by PinDer
Link to comment
Share on other sites

  • 0
Acum 4 ore, PinDer a spus:

Nu sunt sigur ca asta este ceea ce ai nevoie dar..


public ABroadCast(color,const string[],level)
{
    foreach(Player, i)
    {
        if(IsPlayerConnected(i))
        {
            if(gPlayerLogged == 1)
            {
                if (PlayerInfo[pAdmin] >= level)
                {
                    SendClientMessage(i, color, string);
                }
            }
        }
    }
    printf("%s", string);
    return 1;
}
 

public ABroadCast(color,const string[],level)
{
    foreach(Player, i)
    {
        if(gPlayerLogged == 1)

            {
                if (PlayerInfo[pAdmin] >= level)
                {
                    SendClientMessage(i, color, string);
                }
            }
    }
    printf("%s", string);
    return 1;
}

 

 

CMD:a(playerid,params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
     if (PlayerInfo[playerid][pAdmin] > 0)
        {
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/a <Message>");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            if(PlayerInfo[playerid][pAdmin] > 0)
            {
                format(string, sizeof(string), "(%d) Admin %s: %s", PlayerInfo[playerid][pAdmin], sendername, result);

ABroadCast(COLOR_ADMCHAT, string,1);
            }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.