[Ajuda] Comando /cv bug
#3

pawn Код:
if(strcmp(cmd, "/criarveiculo", true) == 0 || strcmp(cmd, "/cv", true) == 0)
{
    new aname[MAX_PLAYER_NAME];
    GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
    format(file, sizeof(file), PASTA_CONTAS, aname);
    if(pAdmin[playerid] == 1 || IsPlayerAdmin(playerid)) {

        new plid;
        new Float:X,Float:Y,Float:Z,Float:Angle;
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp)) {
            SendClientMessage(playerid, Vermelho, "* Use: /Criarveiculo [ID do veiculo]");
            return 1;
        }
        plid = strval(tmp);
        if(IsPlayerConnected(playerid)) {
            if(plid >= 400 && plid <= 611) {
                GetPlayerPos(playerid,X,Y,Z);
                GetPlayerFacingAngle(playerid,Angle);
                new carro = CreateVehicle(plid, X, Y, Z, Angle, -1, -1, 120000);
                PutPlayerInVehicle(playerid,carro,0);
                if(GetPlayerInterior(playerid))
                    LinkVehicleToInterior(carro,GetPlayerInterior(playerid));
                SetVehicleVirtualWorld(carro,GetPlayerVirtualWorld(playerid));
                NaoUsado[carro] = true;
                format(string, sizeof(string), "| INFO | Veiculo ID '%d' criado com sucesso.", plid);
                SendClientMessage(playerid, outraadm, string);
                return 1;
            }
            else {
                SendClientMessage(playerid, Vermelho, "| ERRO | ID inválido, digite um ID válido. ID's permitidos = 400 á 611.");
                return 1;
            }
        }
    }
}
Reply


Messages In This Thread
Comando /cv bug - by LeleziiN - 14.07.2015, 23:02
Re: Comando /cv bug - by matheusspohr - 14.07.2015, 23:06
Re: Comando /cv bug - by LeleziiN - 14.07.2015, 23:20
Re: Comando /cv bug - by Pablo098 - 14.07.2015, 23:33
Re: Comando /cv bug - by LeleziiN - 14.07.2015, 23:39
Re: Comando /cv bug - by matheusspohr - 15.07.2015, 01:07
Re: Comando /cv bug - by LeleziiN - 22.07.2015, 22:52

Forum Jump:


Users browsing this thread: 1 Guest(s)