Vehicle problem
#4

write a simple function to create a non-manage vehicle.

pawn Код:
dcmd_createveh(playerid, params[])
{
    if(GetPlayerInterior(playerid) == 0)
    {
        new model;
        if(sscanf(params, "d", model))
        {
            model = 451;
        }
        if(model > 399  &&  model < 612)
        {
            new
                veh,
                Float:x,
                Float:y,
                Float:z,
                Float:a;
               
            GetPlayerPos(playerid, x, y, z);
            GetPlayerFacingAngle(playerid, a);
            veh = CreateVehicle(model, x, y, z, a, 0, 1, 600);
            SetVehicleVirtualWorld(veh, GetPlayerVirtualWorld(playerid));
            PutPlayerInVehicle(playerid, veh, 0);
        }
        else SendClientMessage(playerid, COLOR_SYSTEMMSG, "[System:] Invalid Vehicle ID.");
   
    }
    else SendClientMessage(playerid, COLOR_SYSTEMMSG, "[System:] You cannot create a vehicle within this interior.");
    return 1;
}
Reply


Messages In This Thread
Vehicle problem - by tbedy - 03.04.2011, 11:48
Re: Vehicle problem - by mprofitt - 03.04.2011, 12:01
Re: Vehicle problem - by tbedy - 03.04.2011, 12:04
Re: Vehicle problem - by mprofitt - 03.04.2011, 12:20
Re: Vehicle problem - by tbedy - 03.04.2011, 12:28
Re: Vehicle problem - by mprofitt - 03.04.2011, 12:56
Re: Vehicle problem - by tbedy - 03.04.2011, 13:05
Re: Vehicle problem - by mprofitt - 03.04.2011, 13:08
Re: Vehicle problem - by tbedy - 03.04.2011, 13:19
Re: Vehicle problem - by tbedy - 03.04.2011, 17:43

Forum Jump:


Users browsing this thread: 3 Guest(s)