[Ajuda] Criar - funзвo
#1

Olб forum sa-mp
tipo eu criei esse comando agora quero criar um
que pega os crash.
Exemplo:
eu libero o cуdigo 136A-F945-A241 ai vo la na
DIALOG_STYLE_INPUT digito o cуdigo e recebo os Crash
PlayerInfo[playerid][pCrash] += 100;
Agradeзo desde ja



Код:
if(strcmp(cmd, "/liberarcodigo", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new Crash[128];
            new Crash1[128];
            Crash = strtok(cmdtext,idx);
            if(!strlen(Crash))
            {
                SendClientMessage(playerid,COLOR_WHITE,"USE: /liberarcodigo [CУDIGO]");
                return true;
            }
            if (PlayerInfo[playerid][pAdmin] >= 8)
            {
                new string3[100];
                format(string3, sizeof(string3), "CodigosCrash/%s.ini", Crash);
                if(dini_Exists(string3))
                {
                    SendClientMessage(playerid,COLOR_GRAD1,"Este cуdigo jб estб liberado!");
                    return true;
                }
                else
                {
                    format(Crash1,sizeof(Crash1),"CodigosCrash/%s.ini",Crash);
                    dini_Create(Crash1);
                    format(string, sizeof(string), "Vocк liberou o cуdigo: %s", Crash);
                    SendClientMessage(playerid, COLOR_LIGHTRED, string);
                }
            }
            else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   Vocк nгo estб autorizado a usar este comando!");
            }
        }
        return true;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)