[Pedido] Ver comando
#4

e assim:

pawn Код:
if(strcmp(cmd, "/resetallvehicles", true) == 0)
{
    if(PlayerInfo[playerid][Dono] <= 4) return SendClientMessage(playerid, COLOR_RED, "Nao pds fazer este cmd");
       
    new Float:distance = 6.0, Float:metres = distance, Float:a;
   
    for(new i = 0; i < sizeof(DynamicCars); i++, metres += distance)
    {
        GetPlayerPos(playerid, DynamicCars[i][CarX], DynamicCars[i][CarY], DynamicCars[i][CarZ]);
        GetPlayerFacingAngle(playerid, a);
        DynamicCars[i][CarColor1] = 1;
        DynamicCars[i][CarColor2] = 1;
        DynamicCars[i][FactionCar] = 255;
        DynamicCars[i][CarType] = 0;
        DynamicCars[i][CarAngle] = a;
        DynamicCars[i][CarX] += (metres * floatsin(-a, degrees));
        DynamicCars[i][CarY] += (metres * floatcos(-a, degrees));
        DynamicCars[i][Neon] = 0;
        DynamicCars[i][cPaintjob] = 999;
        ClearVehicleComponents(i);
        DestroyVehicle(i);
        CreateVehicle(DynamicCars[i][CarModel],DynamicCars[i][CarX],DynamicCars[i][CarY],DynamicCars[i][CarZ],DynamicCars[i][CarAngle],DynamicCars[i][CarColor1],DynamicCars[i][CarColor2], -1);
        Fuel[i] = GasMax;
        EngineStatus[i] = 0;
        VehicleLocked[i] = 0;
        SaveVehicleComponents(i);
    }
    SaveDynamicCars();
    return 1;
}
o outro

pawn Код:
if(strcmp(cmd, "/masscarmodelrandom", true) == 0)
{
    if(PlayerInfo[playerid][Dono] < 1) return SendClientMessage(playerid, COLOR_RED, "Nгo pds fazer este cmd");
   
    for(new i = 0; i < sizeof(DynamicCars); i++)
    {
        new rand = random(sizeof(RandomStableModels));
        DynamicCars[i][CarModel] = RandomStableModels[rand][0];
        DestroyVehicle(i);
        CreateVehicle(DynamicCars[i][CarModel],DynamicCars[i][CarX],DynamicCars[i][CarY],DynamicCars[i][CarZ],DynamicCars[i][CarAngle],DynamicCars[i][CarColor1],DynamicCars[i][CarColor2], -1);
        Fuel[i] = GasMax;
        EngineStatus[i] = 0;
        VehicleLocked[i] = 0;
        CarWindowStatus[i] = 1; //1 = up, 0 = down.
    }
    SaveDynamicCars();
    return 1;
}
Reply


Messages In This Thread
Ver comando - by caoraivoso3 - 08.08.2013, 22:06
Re: Ver comando - by arakuta - 08.08.2013, 22:14
Re: Ver comando - by caoraivoso3 - 08.08.2013, 22:22
Re: Ver comando - by PT - 08.08.2013, 22:29
Re: Ver comando - by caoraivoso3 - 09.08.2013, 07:18
Re: Ver comando - by PT - 09.08.2013, 08:34
Re: Ver comando - by caoraivoso3 - 09.08.2013, 09:05

Forum Jump:


Users browsing this thread: 2 Guest(s)