e o veнculo anterior dele deletar mais nгo to conseguindo fazer alguйm pode me ajudar?
PHP Code:
SpawnVehicle_InfrontOfPlayer(playerid, vehiclemodel, color1, color2)
{
new Float:x,Float:y,Float:z;
new Float:facing;
new Float:distance;
GetPlayerPos(playerid, x, y, z);
GetPlayerFacingAngle(playerid, facing);
new Float:size_x,Float:size_y,Float:size_z;
GetVehicleModelInfo(vehiclemodel, VEHICLE_MODEL_INFO_SIZE, size_x, size_y, size_z);
distance = size_x + 0.5;
x += (distance * floatsin(-facing, degrees));
y += (distance * floatcos(-facing, degrees));
facing += 90.0;
if(facing > 360.0) facing -= 360.0;
return CreateVehicle(vehiclemodel, x, y, z + (size_z * 0.25), facing, color1, color2, -1);
}