[Ajuda] COMO CRIAR CARRO E BOTAR AUTOREPARO
#1

GENTE, QUERO UM COMANDO, TIPO /car [modelo] [cor1] [cor2] EX: /car elegy 5 5 e que quando o player saнsse do server o carro sumisse; e tambйm um comando /autoreparo pra autoreparar o carro e tambйm /autoreparooff pra desligar o autoreparo, quem souber passa aк, desculpa pedir de mгo beijada, sou noob em script ainda, ;\\\
Reply
#2

ve se pega '-'
pawn Код:
if(strcmp(cmd, "/criarcarro", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] < 1338)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            if(CreatedCar >= 96)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new car;
            car = strval(tmp);
            if(car < 400 || car > 611) { MSGPLAYER(playerid, COLOR_GREY, "   Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new COLOR1;
            COLOR1 = strval(tmp);
            if(COLOR1 < 0 || COLOR1 > 252) { MSGPLAYER(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new COLOR2;
            COLOR2 = strval(tmp);
            if(COLOR2 < 0 || COLOR2 > 252) { MSGPLAYER(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid, X,Y,Z);
            new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
            CreatedCars[CreatedCar] = carid;
            CreatedCar ++;
            format(string, sizeof(string), "   Veiculo %d Criado.", carid);
            MSGPLAYER(playerid, COLOR_GREY, string);
        }
        return 1;
    }
Reply
#3

Quote:
Originally Posted by Life Advanced
Посмотреть сообщение
ve se pega '-'
pawn Код:
if(strcmp(cmd, "/criarcarro", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if (PlayerInfo[playerid][pAdmin] < 1338)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "   Vocк nгo esta autorizado a usar este comando!");
                return 1;
            }
            if(admtrampando[playerid] < 1 && PlayerInfo[playerid][pAdmin] != 1342 && PlayerInfo[playerid][pAdmin] != 1341)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "Vocк nгo estб trabalhando! (/trabalhar)");
                return 1;
            }
            if(CreatedCar >= 96)
            {
                MSGPLAYER(playerid, COLOR_GRAD1, "Jб criaram muitos carros, destrua alguns primeiro /destruirid");
                return 1;
            }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new car;
            car = strval(tmp);
            if(car < 400 || car > 611) { MSGPLAYER(playerid, COLOR_GREY, "   Modelo Do Carro Tem Que Ser Entre 411 e 600 !"); return 1; }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new COLOR1;
            COLOR1 = strval(tmp);
            if(COLOR1 < 0 || COLOR1 > 252) { MSGPLAYER(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
            tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                MSGPLAYER(playerid, COLOR_GRAD2, "USE: /criarcarro [IDCARRO] [COR1] [COR2]");
                return 1;
            }
            new COLOR2;
            COLOR2 = strval(tmp);
            if(COLOR2 < 0 || COLOR2 > 252) { MSGPLAYER(playerid, COLOR_GREY, "   Nъmero Da Cor tem que ser entre 0 e 126 !"); return 1; }
            new Float:X,Float:Y,Float:Z;
            GetPlayerPos(playerid, X,Y,Z);
            new carid = CreateVehicle(car, X,Y,Z, 0.0, COLOR1, COLOR2, 60000);
            CreatedCars[CreatedCar] = carid;
            CreatedCar ++;
            format(string, sizeof(string), "   Veiculo %d Criado.", carid);
            MSGPLAYER(playerid, COLOR_GREY, string);
        }
        return 1;
    }
pegou vlw, tem como me mandar do autoreparo se souber? vlw.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)