[Pedido] COMANDO /CAR
#5

Sу procurar um pouco, achei isto uns segundos depois de pesquisar.

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(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;
            }
        }
    }
}
Estб para que sу possa criar se estiver logado na rcon. Sу adaptar ao seu sistema.
Reply


Messages In This Thread
COMANDO /CAR - by lekinho911 - 27.07.2013, 00:29
Re: COMANDO /CAR - by darkxdll - 27.07.2013, 00:44
Re: COMANDO /CAR - by lekinho911 - 27.07.2013, 01:11
Re: COMANDO /CAR - by PT - 27.07.2013, 01:14
Re: COMANDO /CAR - by DarknessPT - 27.07.2013, 11:42

Forum Jump:


Users browsing this thread: 3 Guest(s)