Jump to content

Recommended Posts

Posted

Salut! Am comanda [/pa]:

Spoiler

CMD:pa(playerid,params[])
{
    if(PlayerChatActiv == 1)
    {
        if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pAdmin] <= 0 || PlayerInfo[playerid][pLeader] >= 1)
        {
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/pa <Message>");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            {
                   new estegrad[MAX_STRING];
                   if(PlayerInfo[playerid][pAdmin] <= 0) estegrad = "Civil";
                   if(PlayerInfo[playerid][pLeader] >= 1) estegrad = "Leader";
                if(PlayerInfo[playerid][pAdmin] == 1) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 2) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 3) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 4) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 5) estegrad = "Admin";
                 if(PlayerInfo[playerid][pAdmin] == 6) estegrad = "{FFFF00}Supervizor";
                 if(PlayerInfo[playerid][pAdmin] == 7) estegrad = "{FF0000}Fondator";
                 if(PlayerInfo[playerid][pAdmin] == ? estegrad = "{33FFFF}Fondator{FFFFFF} & {990033}Scripter{FF0000}";
                format(string, sizeof(string), "[/pa]: %s %s: %s",estegrad , sendername, result);
            }
            APlayerCast(COLOR_BLUE, string,1);
        }

    }
    else return SendClientMessage(playerid, COLOR_WHITE, "Aceasta comanda a fost dezactivata temporar de catre un administrator.");
    return 1;
}

Cum i-as putea adauga deelay? Gen un player sa poata scrie pe [/pa] o data la 5 secunde.

  • 1 month later...
Posted
On 3/24/2019 at 1:40 PM, Quinder said:

Ce fel de comanda este [/pa] ?
 

Esti pamant de flori, a pus comanda intr-un citat! 

Ai nevoie de ajutor in scripting si nu ai bani? Te pot ajuta cu mare drag. Dar asta nu inseamna sa iti lucrez un Sistem de joc complet, daca ai nevoie de ajutor ma poti contacta pe Discord.ezgif-2-3a38433e2465.gif.9283810e304f5e405309769455e5e14b.gif

Posted
CMD:pa(playerid,params[])
{
    if(PlayerChatActiv == 1)
    {
    	if(gettime() < GetPVarInt(playerid, "padeelay")) return va_SendClientMessage(playerid, -1, "Mai de asteptat %d secunde.", gettime() - GetPVarInt(playerid, "padeelay"));
        if (PlayerInfo[playerid][pAdmin] > 0 || PlayerInfo[playerid][pAdmin] <= 0 || PlayerInfo[playerid][pLeader] >= 1)
        {
            new string[250],result[250],sendername[25];
            if(sscanf(params, "s[250]",result)) return SendClientMessage(playerid, COLOR_WHITE, "{FF9900}Scrie: {33CCFF}/pa <Message>");
               GetPlayerName(playerid, sendername, sizeof(sendername));
            {
                   new estegrad[MAX_STRING];
                   if(PlayerInfo[playerid][pAdmin] <= 0) estegrad = "Civil";
                   if(PlayerInfo[playerid][pLeader] >= 1) estegrad = "Leader";
                if(PlayerInfo[playerid][pAdmin] == 1) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 2) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 3) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 4) estegrad = "Admin";
                if(PlayerInfo[playerid][pAdmin] == 5) estegrad = "Admin";
                 if(PlayerInfo[playerid][pAdmin] == 6) estegrad = "{FFFF00}Supervizor";
                 if(PlayerInfo[playerid][pAdmin] == 7) estegrad = "{FF0000}Fondator";
                 if(PlayerInfo[playerid][pAdmin] == ? estegrad = "{33FFFF}Fondator{FFFFFF} & {990033}Scripter{FF0000}";
                format(string, sizeof(string), "[/pa]: %s %s: %s",estegrad , sendername, result);
            }
            APlayerCast(COLOR_BLUE, string,1);
            SetPVarInt(playerid, "padeelay", gettime() + 5);
        }

    }
    else return SendClientMessage(playerid, COLOR_WHITE, "Aceasta comanda a fost dezactivata temporar de catre un administrator.");
    return 1;
}

Sa ai si #include <YSI\y_va> altfel te poti folosi si de un format string.

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.